Skip Navigation

[Resolved] Display latest entries from specific CPTs on a page

This thread is resolved. Here is a description of the problem and solution.

Problem:

In this ticket the user wanted to display the 5 latest posts that they created.

Solution:

What you need to do is to create a view, select the Post Type that you want it do display. Under the Limit and Offset, set the limit to 5 and for the Ordering setting, change it Post Date.

Finally all thats needed is to use the Loop wizard on your view to add the relevant shortcodes for the components of the post that you want to display.

Then just add this view to your page by going to the page on the backend selecting the Types and Views button then adding your view to the page.

This support ticket is created 6 years, 4 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 6 replies, has 2 voices.

Last updated by thoraldM 6 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#1097025

I would like to display the latest 5 entries on a selection of custom post types I created with Types on a WordPress page. Is it possible?

#1097033

Shane
Supporter

Languages: English (English )

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

Hi Thorald,

Thank you for contacting our support forum.

Do you currently have our views plugin installed ? If so then I can guide you through the steps on how to achieve this with the views plugin.

Thanks,
Shane

#1097039

Yes, I bought the subscription so I have the Views plugin installed.

#1097090

Shane
Supporter

Languages: English (English )

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

Hi Thorald,

Great.

What you need to do is to create a view, select the Post Type that you want it do display. Under the Limit and Offset, set the limit to 5 and for the Ordering setting, change it Post Date.

Finally all thats needed is to use the Loop wizard on your view to add the relevant shortcodes for the components of the post that you want to display.

Then just add this view to your page by going to the page on the backend selecting the Types and Views button then adding your view to the page.

Please let me know if this helps.

Thanks,
Shane

#1097127

Thanks Shane. I think I got the basic gist.

I have a different question now.

I want to create a view consisting of a grid of the last 5 posts from each CPT, but I want to:

1) Display the featured image for each entry and make it a link to the entry itself.
2) At the same time, I want the title of the entry to be overlaid on the featured image.

Is there something in Views that would let me do this? Or does it have to involve some external CSS styling?

#1097130

Shane
Supporter

Languages: English (English )

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

Hi Thorald,

You can do this with the GRID option for the Loop wizard but to overlay the title on the image you will need to use some css to do this.

hidden link

Thanks,
Shane

#1099654

Thanks. I got it working.