Skip Navigation

[Resolved] How to show only selected post in a template from view?

This support ticket is created 5 years, 3 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 5 years, 3 months ago.

Assisted by: Nigel.

Author
Posts
#1181409

I need to display only selected posts via view (in loop) in a template.

I mean that
-> When I am inserting the view in a template then there is option, that show me list of post from specific posttype.
-> Then i select the multiple posts and insert a view in template.
-> And now in front only show selected posts.

Is there any possible way to achieve this?

#1181415

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Screenshot 2019-01-10 at 12.17.47.png

There is no way using the UI that you can select the posts which a View should display from a list of posts.

You can do this if you know the IDs of the posts you want to include.

When you create the View add a Query Filter for post id (screenshot), where you can add a comma-separated list of post IDs.

Or if you want to re-use this same View on different pages but with different lists of post IDs, you can choose to have the IDs provided by shortcode attribute ("ids" is the default), then when you insert the View via shortcode, supply the list of IDs there, e.g.

[wpv-view name="My View" ids="1,7,13,27"]

If you wanted to be able to visually select posts the alternative would need to be using a taxonomy (built-in categories or a custom taxonomy) and marking the desired posts with that taxonomy term (e.g. "featured"), and then add a Query Filter to your View to only show posts with that taxonomy term.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.