Build Your Own Business Website header image

Community Library Website – Case Study Part 7 – Creating Hierarchical Custom Taxonomies

Whoops, you've found some premium content!

Watch the opening clip of this video to preview it,
the full video is available to paid members.

This is the seventh in a series of live lessons on using WordPress and Thesis as a Content Management System (CMS). In this case study we are creating a community library website. In this lesson we set up our hierarchical custom taxonomies. We go through the process of configuring them using the Custom Post Type UI plugin.

Video Transcript

Rick: So then okay so… the next step here then is to… now that we’ve kind of figured out what our system is, now the next step is to create that. And so we’ll start off with the hierarchical taxonomies, the media type and the location. And we’re going to go back under the custom post UI, add new, actually… yeah, add new. That’s fine. We’re just going to add a new taxonomy and let’s see… the new taxonomy is going to be media type. I’ll do that one first. Media… I think really, we need to do… same media type like this. And then the label will be media type and the singular label is going to be the same media type. And then we are going to attach this media type to book reviews and book/media. We’ll go to our advanced options and in this case, we decided it is going to be hierarchical even though we aren’t going to use subcategories. We are going to use… it’s only going to have a single media type. We are going to show the UI. We are going to have a query of r. We are going to rewrite and the rewrite in this case is going to be media type, I think. So we’ll go ahead and create this custom taxonomy. We’ll also look at the label options. So search items, this is going to be search media type, popular media types. So it’ll be popular media types. I don’t know. That’s probably not right anyway… maybe… because really… we’re not really going to use… there’s only a few different media types. We’re just going to leave it as it is. Keep that like that and we’re going to create the custom taxonomy and now, you can see over here under books/media that the media type is there. And so we can go to media type here and we can create new media types.

So the first media type is books or book. And the slug is automatically going to be book. The parent is nothing and we’re going to add the new media type. Oh, there it is, okay. And that’s done. And then the next one that we’ll create is… oh, let’s look at our data list. So we’ve got books, we have board book, look at that add new media type…we’re going to have…we’ll pick one more media type that is DVD. All the rest of the media types will be automatically added when we create or when we import the posts. So we don’t really have to worry about getting them all right at this moment.

But now you can see that if we are… let’s see… let’s just… let’s say add media here and we’re going to create a test book. You can see under media types, you’ve got board book or DVD. Let’s go ahead and select book and that’s what shows up like this right now, right? So the next thing to do then is to add location and we’re going to do that exactly the same way. That is, we’ll come back down here to custom post types, we’re going to say add new and the taxonomy name is going to be location. I suppose the label… I suppose we could make locations plural. It probably makes some sense. Now, book reviews probably doesn’t care about locations but books/media is going to so we will go ahead and select books/media. Actually Pam, I’m going to turn your microphone back on here again for a second. Are you going to want… is location a useful piece of information for book reviews?

Pam: I don’t think so because mostly the purpose of locations is to tell the user where do you go if you want to find this item. So it doesn’t really apply to book reviews.

Rick: Okay, perfect. So then we’re going to go… hierarchical, true. All the rest of that stuff is true. We’ll create that custom taxonomy and now if we go back to books/media, did I… I don’t think I… oh yeah, okay. I saved it as a draft. If we go back to edit now, you can see that we have media type and we have locations and no locations have been created yet. So we can add a new location here and I know that one location is storage. So we’re going to add that new location and let’s just look at a couple more locations here. Multimedia wall…we can’t actually add the new location this way because it would add it to the… it would actually add it to this so what we’ll do then is we will come back over to locations here and we’ll just add it. Multimedia wall, add the new location, and let’s just add one more here for grins, E. Children. Come back over to locations and we’ll add E. Children, add new location. Okay so now we have 3 locations selected and if we go back over to our books/media, we can edit this draft and we’ve got a book and we’re going to put it on storage and we’ll hit publish. And now these 2 elements are going to be part of that. Now one thing you can see here is that we don’t have any of those Thesis fields here and that is something else that we’re going to have to do. And you know, I guess we may as well do that this evening. Yeah, we may as well do that this evening but perhaps, not just yet.

0 Comments… add one

Save $200 on Membership Now!

Start learning today for as little as
$0.82 PER DAY!
THIS IS A LIMITED TIME OFFER!
Subscription Options
0 comments… add one

Leave a Comment