This is the eighteenth in a series of live lessons on using WordPress and Thesis as a Content Management System (CMS). In this session we configure and add WordPress 3.0 menus to the site in order to display lists of our custom post types and custom taxonomies.
And so the next thing we want to do then is we want to add menus to this because right now, we don’t have a good way of getting at these posts. And so we’re going to create… well, we’re going to do something similar to what we did at the very beginning of this session which is we’re going to go to Site Options, select menu type and we’re going to select the WordPress nav menu as the menu type and hit save. And then we’re going to come down to Appearance and Menus and we’re going to create a new menu… we’re going to call it main menu and save it.
Okay and so the first thing we want to do on this main menu… well, the first thing we want to do on the main menu is just go to home. So let’s say tutorial… no, not tutorial… pardon me. This is www.library.byobtutorial.com… okay, the label… this is going to be home. We’ll add that to the menu and then we’re going to create another one which is going to display these post types. We want to display all of the post types of catalog items. So we’re going to create another one which is www.library.byobtutorial.com/ and then what we’re going to do is we’re going to add a query to this call and the query is question mark and then it’s going to say post_type=… and then it’s going to be catalog-items. So that’s the name of our post type, catalog-items and this is a standard query variable for catalog-items. Because what we want to do is we want this to be as automated as absolutely possible so this is… so we want to use all of the default functions that we can. So now our label here is going to be catalog. We’re going to add that to the menu and then under catalog, I think we’ll show a list of books, DVDs and audio books.
So now what we do is we come down here to our media types and you can see that book, audiobook, and DVD are there so we’re going to add those to the menu and we’re going to add them as subpages or submenu items. And then we’re going to rename them from book to books then we’re going to give them a title attribute too which is Browse our Books. And then audio books and it’ll say “Browse our Audiobooks.” This is going to be the hover tool tip when you do that. Come down here, DVDs… “Browse our DVDs”… and then we’re going to save that. We’re just going to take a look at here real quick. Once it’s been saved… okay, there must be something not quite right here. Site Options, select nav menu… let’s look at Thesis nav menu for a second and then we’ll switch back to WordPress nav menu. Oh no, I know what we didn’t do. We did not specify the main menu. That was the problem. The primary menu here has to be specified as main menu. Now we hit save and now we refresh this and we have home and catalog. And if we select catalog, we get a listing of absolutely everything. And if we hit books, we get a listing of books. Audiobooks, we get a listing of our audiobooks.
And then let’s add one more to this and this is going to be recent items. And what we’re going to do for that is we’re going to put a pound sign here and we are simply going to say recent items. That pound sign will mean that if you click on this, it doesn’t take you to anything. It leaves you on the page that you happen to be at. And then we’re going to add to that… adult, children, and family. We’ll add that to the menu and adult… I’m going to put family like that…children or family. And then we’re going to say the label will be for adults, for families, and for children. And the reason why we can do these is because these are taxonomies that we’ve created and we told them that we wanted them available inside the menu when we created them so here they are available to us in the menu. And then what’s happening then is when we ask for these pages, we are getting a taxonomy archive for that taxonomy name. And so if we select the for children, we are getting the taxonomy archive for the taxonomy audience where the value is children. And so if we come back over here and refresh that and we say recent items for families, it’s brought up… we’ll, it’s brought up a bunch of audiobooks actually so obviously there’s… it was the only thing that was specified under families. And then there are books and so on and so forth. And you can see that date that they’re listed as… this date and it’s got my name on here which of course, we want to change.
Now, we can alter the way this stuff turns out too obviously by doing that in Thesis Design Options. Because it’s a category archive page, we could look at our page here and we could say everything’s a teaser and refresh this. And now you’ll have it in a teaser format for new and recent books and then if we wanted to keep them as teasers then we could also… under archives… under teaser display, we could choose link to full article, post link out but we’ll leave that in there. And perhaps, under link to full article…yeah, we could just leave that there for a moment. And then if we refresh this you know, we’ve got the post date and we can add anything we want to these teasers.
And I’m just going to take this a little bit longer because of the screw ups and I want to add the other part to this that I was planning on adding which is the information for you know, for the subtitle and the author. And before we do that, under bylines and post meta data… Display Options, bylines… I’m not going to show the author of the post because in this case, the author of the post is the person who published the post. And so that doesn’t really help. So we’re just going to show the acquisition date. I don’t think post category is going to help either because there aren’t any categories associated with it. So if we hit save again and then refresh…