Build Your Own Business Website header image

How to Use the Query Box to Display the Latest Post

Difficulty Level -

Filed Under Topics -

Listed Under Lesson Subjects -

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.

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.

Video Transcript

Member:  Okay, a client wants on their website a blog to be on a blog page, not…

Rick:  Yeah?

Member:  Okay so…and so in you know, I just made this static page and had the blog post be on the blog page.

Rick:  Sure.

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:  Yeah.

Rick:  Okay.

Member:  So I don’t know if there’s an easy way to…

Rick:  There is an easy way to do that.

Member:  Okay.

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.

Member:  Okay.

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.

Member:  Okay.

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.

Member:  Okay.

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:  Okay.

Rick:  But…

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.

2 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
2 comments… add one
  • Jonathan Bowker August 19, 2013, 11:36 am

    Please can you tell me why if I select categories I the query box no categories show up in a new drop menu. I am using Thesis 2.12

    • Rick Anderson August 19, 2013, 11:44 am

      Because there are no posts with those categories. Only categories that have posts already assigned will show up in the list.

Leave a Comment