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 Make a Website with WordPress Custom Post Types and Fields in WordPress Custom Post Type Templates

Nthulane Makgato
PLUS
Nthulane Makgato
Courses Plus Student 19,602 Points

As you add more custom post types and fields, will you always have to add your own php files for it to work?

I am hoping that adding custom fields is much easier than this.

Surely we won't always have to add our own art.php, content-art.php and single-art.php every single we add post or field, right?

2 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

By default a custom post page can use the archive.php and single.php templates but this may not output all the fields you need where you want them. In general you have to create new templates for new post types because WordPress cannot know what fields or post types you want to use. There are some page builder type plugins that help you create the templates for custom post types on the fly.