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 trialdaveliveseyuk
10,569 PointsQuestions on Custom Post Types
Hello all, I've been working on the 'Learn WordPress' track and I'm now working on my own theme. I'm fully comfortable using the custom post type plugins used throughout the tutorial but I'm wondering whether you are able to add more fields to the default post type? Another question I have is about applying categories to custom post types - any help would be appreciated!
2 Answers
Kevin Korte
28,149 PointsI'm wondering whether you are able to add more fields to the default post type?
Yep. Just create a new post type, and set the fields to display when the post type is equal to "post"
applying categories to custom post types
If you're using the CPT UI plugin to create your post types, at the bottom of the advanced options, it gives you a checkbox for both categories and tags in the "Built-In Taxonomies" section. Check what you want, and then on the custom post type page, you'll have the same meta boxes like a default post type, and you can use the data in the same way.
Easiest way to do it, or you are putting you post types by hand in the function.php file?
daveliveseyuk
10,569 PointsI'm using the plugins as per the tutorial.
Thanks for the help Kevin!