Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress How to Build a WordPress Theme WordPress Theme Functions Displaying Custom Posts and Fields in a Template

Montalvo Miguelo
Montalvo Miguelo
24,789 Points

What template do i need in order to display custom post types categories.?

Example. if I have a custom post type for 'Cars', and I want categories : VW, Ferrary, Mercedez, .... etc..

3 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Yeah, left that bit out, but have it covered in the next version of the project.

Try checking out this in the meantime: http://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-post-types-archive-page-in-wordpress/

Hi Ubaldo You can use 'archive-cars.php' to display your achive page and then use single-car.php to display individual cars. You can create a custom templates for each. see: http://codex.wordpress.org/Page_Templates

Montalvo Miguelo
Montalvo Miguelo
24,789 Points

It doesn't work... If I have a top menu with the categories ... Alway calls to the category.php template :/ not archive-name.php