In this session we demonstrate how to use the Thesis 2 query box to display the latest post on the home page. We show how to add a query box, place it where we want it to appear on a page and customize the query box to add the post that we want. We also demonstrate how to choose to show the recent post from specific categories, set it to show multiple and customize its appearance.
Member: Okay, a client wants on their website a blog to be on a blog page, not…
Member: Okay so…and so in you know, I just made this static page and had the blog post be on the blog page.
Member: But now she would like the latest post to show up on her home page.
Rick: How many?
Member: Just one.
Rick: Just one.
Member: So I don’t know if there’s an easy way to…
Rick: There is an easy way to do that.
Rick: So you know, you’re at your front page here, right? And what you’re going to do is in the place where you want that to show, so in this case I’ve got a left hand column and a right hand column, right? Let’s just say that I want to put it in my right hand column for a moment. So I want it in the sidebar. What you do is you’d come over to add a box and you’d add a query box.
Rick: And you could call this recent post. You can call it whatever you want but you’re just adding a query box. And then we will shift drag that query box over to content right and it’s going to sit above my sidebar so any widgets I have will be below this post. And now all I have to do is select what I want. So okay, I want a post and I want it just to be the most recent post. I only want to show one post and we’re going to sticky posts but in their natural position. And actually, I don’t think we’re going to have to change any query box options at all. But we could you know, add some query box options.
Member: Now what does sticky post mean?
Rick: Well, a sticky post you know, if you’re a blogger, sometimes you have a post that you think is really good that you want somebody to see the very first time to your posts page.
Member: Oh got it. okay.
Rick: You can make it sticky.
Member: Got it.
Rick: And you do that from inside the post edit screen. There’s a little dialogue over there that says, “Make this post sticky.” And if that’s the case, it’ll always be at the top of your blog page. However, obviously, if you want to show only one recent post, you don’t want that sticky post showing up here. So that would be why you would show sticky post but in their natural position.
Member: Got it.
Rick: Or if you just want to show this sticky post then you can do this one instead, right? Show the sticky post.
Member: Sure. Got it.
Rick: Now there’s a lot of other things you can do here because you could choose not to do your most recent post but you could choose to say show my most recent post from a specific category. And then let’s say show me the… I have a category called design ideas. So what I really want here is the most recent post in the category of design ideas and now we’ll only show one post.
Member: Got it.
Rick: So you do have a choice of doing that kind of stuff.
Rick: And then once you’ve done that and saved your template, I mean, you can style this, right? You’ll probably want to style it. But in terms of whether or not it’s actually working you know, there it is right there.
Rick: And now you can change up what’s in here, right? So now you come over to your skin editor and you look at this recent post and you click on that thing. Pardon me, not that thing. You don’t click on the gear. You click on the drop down. And now you have this same range of choices that you have with the post. So let’s say well, I definitely want the headline but I don’t want the author or the link to show up there. So I can just drag those out. But maybe I do want the featured image. So you can click that up and then… yeah, that’s probably all you need to do. Let’s see what it looks like. But… oh no, drag the featured image up a little bit. So now you’ve got your headline, a featured image and your excerpt. And save the template… are we in the same place? Yeah. Refresh it. Oh, I don’t have a featured template set up for it, I mean a featured image set up for it.
Member: Yeah, I get the idea though. I have not…
Rick: And you can set this to show multiple, right? It doesn’t have to be just one. It can be any number and you can customize its appearance any way you want.