Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

WordPress

Ryan Bonner
Ryan Bonner
2,383 Points

Understanding custom taxonomies

Are there any learning tracks in Treehouse that cover creating custom taxonomies for custom post types? A basic search revealed nothing, so I thought I'd ask.

4 Answers

Kevin Korte
Kevin Korte
28,109 Points

I just finished doing a ton of work with custom taxonomies....almost all I have to solve myself using the codex. Do you want to just create them?

Ryan Bonner
Ryan Bonner
2,383 Points

The difficulty for me is that I have limited experience with manipulating database tables and JavaScript, so I was hoping that there was a Treehouse learning track that would help me build up the underlying skillsets.

Kevin Korte
Kevin Korte
28,109 Points

Fortunately, with WP's functions you do not have to manipulate the database, and you get all of your taxonomy terms back to the page without Javascript.

There are two ways to do it, one is to manually register your taxonomy in your functions.php file. More can be read here -> http://codex.wordpress.org/Function_Reference/register_taxonomy

Or, what I do is actually us the Custom Post Type UI plugin to create my custom post types, and create my custom taxonomies. It's very easy to assign a custom taxonomy to a custom post type with that plugin.

Ryan Bonner
Ryan Bonner
2,383 Points

Primarily, yes. I'm building a media content library, and I need to create a new taxonomy to handle all of the unique category tags that I want separate from my blog post categories.

Ryan Bonner
Ryan Bonner
2,383 Points

That is awesome advice, Kevin! I really appreciate it!