From the course: WordPress: Custom Post Types and Taxonomies

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Adding taxonomy terms to your post types

Adding taxonomy terms to your post types - WordPress Tutorial

From the course: WordPress: Custom Post Types and Taxonomies

Start my 1-month free trial

Adding taxonomy terms to your post types

- [Narrator] With all of the code for our taxonomy set let's add some to our businesses. We'll go ahead and click on businesses and then click on one of our sample businesses. Let's do Leaf and Mortar. From the right sidebar we can add a new size. Let's add small, since Leaf and Mortar is a small business. We'll then click update, and if we view this post you'll notice that nothing has changed. That's because our custom taxonomy isn't being pulled on the template that's rendering this page. We'll address that later. But if we go to sizes, and then view the small size, you'll notice that we're getting that 404 error again. And that's because we haven't flushed the rewrite rules since defining our taxonomy. Let's go to dashboard, settings, permalinks, and then click save changes. Now if we go back to businesses, sizes, and click on the view for small, we see the size archive. It's worth noting that the URL structure for our size archive is size-slash-small. If we try to go to just…

Contents