Skip Navigation

[Resolved] Pull one latest post on homepage with a content template

This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Shane 4 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#1763939
Screen Shot 2020-09-01 at 10.02.39 PM.png

Tell us what you are trying to do?
I'm trying to create a section on a homepage that displays the latest blog post. I only want one post to show. I tired creating a content template but for some reason it's pulling content from the homepage and not a post.

Is there any documentation that you are following?
I watched YouTube videos
Is there a similar example that we can see?

What is the link to your site?

hidden link
You'll see what i tried to do on the bottom of the page. Below that is what it should look like. The attached image is what I'm trying to accompish.

#1764333

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi John,

Thank you for getting in touch.

In a case like this you will need to create a view to list the latest post and then add that view to the content template.

Can you let me know if you are using our Toolset Blocks plugin so that I can provide an accurate description of how to achieve this.

Thanks,
Shane

#1764335

Hi Shane,
I tried to use the blocks plugin but found it a bit unintuitive - I can't figure out how to add just this specific section on to a page. I'm familiar with the Views plugin but I'll use whatever is easiest. I just want this post on one section of the homepage - I don't want a whole new page.
Thanks,
John

#1764395

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi John,

Since you're familiar with Views I will explain how to do it below:

1. Create your view that will list your posts.
2. For the order option in the view settings you will order your view by the post date. This will get ensure that you get the latest post first.
3. Using the Limit and Offset settings you will set the limit to 1.

Once you've done this your view should only list 1 post and this post being the latest post.

Please let me know if this was clear.

Thanks,
Shane