Skip Navigation

[Resolved] shortcode for display one specific custom post

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

Last updated by Shane 5 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#951216

Hi, my problem possibly is so easy to solve that I did'nt find anything about it in the documentation:
I managed to create complicated views with several items of a custom post type, wonderful.
But what is the shortcode to insert only one specific post??
Thank you very much for your help!
Regards, Rita

#951429

Shane
Supporter

Languages: English (English )

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

Hi Rita,

Thank you for contacting our support forum.

You mean you want your view to display the contents of 1 specific post?

Please let me know.

Thanks,
Shane

#951448

Hi Shane, yes, as I wrote. What's the shortcode if I want to only show the custom post 'apple' from the custom post type 'fruits'?
Thank you!
Rita

#951498

Please do answer soon! This is stopping me in the tracks. I have been able to show lists of customs posts with views, templates etc. the way I wanted them. That was fine.
But I can't figure out how to show only a single post (like 'apple' with image, title and description of this custom post) in another post. Do I have to create a special view for that? This would be a lot of work if I want to write some text in a post, then enter a single custom post ('apple'), then write some text, then create another view especially for 'banana' etc. And how can I chose the title of the post I want to show in a view? I don't find anything about that. It does not have an ID (where could I find that?)

#951540

Shane
Supporter

Languages: English (English )

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

Hi Rita,

Not sure if I understand correctly.

So lets say you have 1 post called fruit and another called apple. Are fruits and apples related through Types relationships?

I need a little more information on the relationship to point you in the right direction because it can be as simple as passing the ID of the post you want to the view or setting up the view filters for a Parent/Child relationship.

Looking forward to hearing from you soon.

Thanks,
Shane

#951580

Hi Shane, 'fruit' is the custom post type, 'apple' is the post, as well as 'banana' or 'peach'. I can build a view, showing all fruits perfectly.

But what if I want to show only one specific post ('apple') from the 'fruits' post type? How can I embed the 'apple' into a page, for example? I don't have an ID-Number and there is no field called 'post title' where I can chose the 'apple' post to embed it.

I expect something like [wpv-post='apple' + featured image + title + description or wpv-post-id='123456' + featured image + title + description] to embed this specific custom post with image, title and text into my page. It can't be that I have to create a view to show a simple post? I don't find a post id-number. This is a quite straightforward question, so please don't make it too complicated - I just want to show ONE custom post!! How?

#951583

Shane
Supporter

Languages: English (English )

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

Hi Rita,

I see what you're saying now.

So on your view there is a section called, Query Filter. What you need to do is click the Add Filter button and add the filter for the Post ID.

Then just insert the ID of the post there and this will allow the view to only display the contents of that particular post.

Thanks,
Shane

#952102

Shane, thank you. I think I wrote it three times now: I can't find a post id. Where is it?

#952320

Shane
Supporter

Languages: English (English )

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

Hi Rita,

So when you go to the post on the backend and edit the Post, it should be in the URL of that post edit screen.

Please let me know if you're able to find it.

Thanks,
Shane

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