Skip Navigation

[Resolved] Just show a specific post

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

Last updated by marcialB 6 years ago.

Assisted by: Nigel.

Author
Posts
#690642

Hi there

We have a custom post type "Team" that includes several team members. We have a view that displays all team members. So far so good. However, at some points, we need to show only one specific person. Now I'm unsure which attempt is the best. As it might change from page to page and within every news post we make, I don't want to use categories to filter the team members - that would be a lot of work.

So I tried to adjust the view shortcode within a page

{!{wpv-view name='personenverzeichnis' limit='1' orderby='340'}!}

with the ID of the post. But that doesn't seem to work. Maybe I need to specify that this filter is the ID? Or maybe there is a even better solution?! I think adjusting the shortcode is the best way to do it, because this way I don't need to adjust anything else within the post type.

I hope you understand what I would like to achieve and can point me in the right direction. In the documentation I didn't find anything that helped me.

Best,
Marcial

#690694

Nigel
Supporter

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

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

The simplest way to do this is to create a Content Template which is not assigned to any post type, which outputs the fields you want from a Team post.

Insert the shortcode for this content template wherever you want it to appear, and include the id attribute of the Team post you want to display.

When you insert a Content Template the shortcode used is wpv-post-body, which includes the template name as an attribute.

If you want the output to match the output of your View, and your View Loop Output section links to a Content Template, then you could simply use that template and add the id attribute, something like this:

[wpv-post-body view_template="Loop item in Things ordered by status" id="99"]

Note, it looks like you are using a page builder, so the shortcode may be inserted with the {!{ }!} format rather than square brackets.

#693027

Hi Nigel

Perfect! Thank you.

When inserting a view I didn't find that hint for using the ID. Maybe you could add that to the description.

Best,
Marcial

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