This is the twenty ninth in a series of live lessons on using WordPress and Thesis as a Content Management System (CMS). In this lesson we create a custom catalog page and discuss the types of functions we’d like on this page. In future sessions we will add two searchable catalog menus, we will show recently added catalog items and have a sidebar with a variety of ways to search for the catalog items.
Rick: Okay so now we’re on to Part 29 of the Library project. And so Pam, I’m going to turn on your microphone there. Good morning, Pam.
Pam: Good morning Rick.
Rick: How are you doing?
Pam: Very well. Glad to be back at this project.
Rick: Yeah, me too. And so, you just sent me this file here saying what you wanted that catalog page to look like. So, I have a heading that says browser search the library catalog and then we have a couple of sets of menus – one for adults and one for children. This menu here would display all of the posts… I’m sorry, all of the custom post types or all of the… in this case, all of the catalog items that are in the non-fiction location taxonomy and are in the audience taxonomy of adults. And interestingly, then we would add a couple of different things here. We would add adults and instead of being location, now audiobooks would become media type and DVDs would be media type. And the same thing is true over here for children, books for children in a specific location and then we’ll get to audiobooks, videotapes and DVDs and these are all media types for children rather than books for children. So do I have a pretty good explanation of how you think that works?
Pam: Yes. What I was thinking of was that each one of those would represent a location taxonomy because I have… since you uploaded the sample, I have broken down the DVD location into 2 different locations, one for children and one for adults, and the same way with audiobooks. So each one of those items in the menu could be represented by a single location taxonomy.
Rick: Okay well, I’ll show you how to do that. Anyway, that’s how we’ll work at it. I probably won’t throw the data and reupload the data at this point in order to stay current for this. But it’s not really that big a difference either. The code is going to be very much the same that we’re going to use in order to accomplish that.
So okay, and then what we have is we have this listing of recent catalog items which I’m going to want to talk to you about in just a moment. And then we have the sidebar with a variety of different ways to search for the catalog items. And the search is going to have a search function and it’s going to have a links function and then it’s going to have a topic browse function. Then finally, what you don’t have here is it’s going to have a drill down function where you can say, “Okay, I want to see…” Well, I’ll show you what it looks like. It’s going to be one other way of accessing the data.
So let’s talk about this for a moment. Tell me about added in the last 60 days. Why is that the important thing?
Pam: Well that was sort of an arbitrary thinking about people coming to the catalog page and by default, just wanting to see what’s new in the library and having… and then just choosing some way of deciding what we define as new titles so that we would show those new titles as our default, just so people can quickly come and see… is there anything new since the last time I looked at the library? And I just sort of arbitrarily decided that new in the last 60 days would be a good way of getting the new books because we have new titles every month.
Rick: Okay and… but you don’t necessarily add new titles to every one of these things every month, right?
Pam: That’s right. We would add new in a few categories but not all of them.
Rick: And so, you don’t expect all of these categories to show.
Pam: That’s right. I would expect to see the banner going across the page that would say something like non-fiction, fiction, children’s audiobooks… you know, might be a few of those categories but not all of them.
Rick: Okay and so, by a new title what you mean is you are…when you say added in the last 60 days, with the database right now, we’ve used the acquisition date as the date that this would be you know, based on right?
Rick: And so, we may… in order for us to display properly, we may have to fool around that just a little bit in order to make anything display. Because chances are, the database is more than 60 days old and so then nothing would display until you start adding stuff.
Pam: Right. Right now, it would be displaying that whole…oh, I can’t remember whether it was 100 or 200 or whatever that we kind of all grouped under the acquisition data some time a few weeks ago.
Rick: Well I think actually, what we did was we didn’t do it that way. I believe what we did was allow acquisition date… yes, we allowed the acquisition date to be the date. And so, unless I misunderstood how we dealt with the acquisition date… I suppose maybe I did.
Pam: And I may be confused too.
Rick: Well, let’s just look at… just for a moment, let’s go to catalog items because this will show us their dates. Okay so 2011/1/12 and 2011/1/7…so obviously, nothing would show up if we used 60 days. So what we’ll use is 120 days or something like that and you’ll be able to swap that number out.
Pam: Sure, that makes sense.
Rick: Yeah okay, perfect. Well, and so… here’s what I think we’re going to try to get done today although obviously, it’s not going to get done this morning. We’ll have to work on it again this afternoon or this evening as well.
So we’re going to start off by creating a catalog page and then we’re going to create catalog menus and then we’re going to add those catalog menus to the catalog page and then we’re going to style them. And then we’re going add our search functions like this search sidebar, tag cloud for the topics, the links to the sidebar which I’m going to move up there and then this advanced search system that talked I about. And then probably to wrap up this evening, we’ll actually add the custom loop to the catalog page which will display everything we’ve just been talking about. I haven’t actually figured that out yet but I’ll probably figure that out today. So that’s what we’re going to try to accomplish.
So we should just start off by adding this catalog page which of course is you know, no big deal. But I wanted to preserve the other page, the other catalog page that we have and I’m just going to add another one. Add new… let’s close this for the time being. And what was that title that you wanted to use? You wanted to use browse or search the library catalog. And we’re going to go ahead and publish that.
And then what we’ll do is come down to our menu, Appearance and Menus and go to our main menu and then we will scroll down here to pages and add that to the menu. I’m going to drag that up here before this catalog although not a subpage. And then we’ll just change the name of this to custom catalog. Yup, custom catalog…save, come over to the site. And so, here’s our custom catalog page that we just created.
And now what we’re going to do with this custom catalog page is we’re going to add those menus and those menus will show up actually down here below the content. And then the rest of that loop will show up below that and we’ll keep this old catalog page still in place. But it’ll behave and it’ll keep its old functionality.