Skip Navigation

[Resolved] How can I get a custom post type to display in a content template by taxonomy?

This support ticket is created 4 years, 7 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 3 replies, has 2 voices.

Last updated by Beda 4 years, 7 months ago.

Assisted by: Beda.

Author
Posts
#1320663

Would like to use a WPBakery content template to display the content (post body) of a custom post type called "Videos", by the Category slug that the post is tagged with - the video must show up in the content template in a lightbox.

#1320867

I am not sure if I understand correctly, however I think you either want to display data in a Content Template conditionally to what taxonomy term is selected, or, you want to assign a Content Template to a post depending on the taxonomy term chosen.

1. You can assign a Content Template to single Posts or an entire Post Type, but not depending on taxonomy.

That means that natively, all posts where you assign that Template, no matter the taxonomy term, will use that Content Template.

2. If you instead want to display data in the Content Template, on all those posts, but related to the Taxonomy Term selected for the single post seen, you could for example use a View.

The View can be set to query Taxonomies, and in the View Query Filter section you can select to only display terms as "Set by the current post".
Then in that View loop, you can display data of those Taxonomy Terms, and once inserted in the Content Template, on your posts it will display a list of those terms assigned to the post.

3. Another approach is to display the post taxonomy directly on the Content Template with a wpv-post-taxonomy shortcode (you can insert it with the Fields and Views GUI).
That will display either a link or name of the taxonomy tag added to the post (separated if there are many).

4. You can even conditionally display data in that template, according to what terms are selected in the taxonomy.
This would be explained here:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/displaying-taxonomies-conditionally/

If none of these help you achieve the goal, could you elaborate more on the precise steps you take and how it should look alike, so I can then reformulate my suggestions?

#1321421

Is anyone available via chat to talk through this in real-time?

#1321839

We have Chat, but you'd have to open a new ticket, because I cannot convert tickets into chats, we can only convert Chats into tickets.
To open such chat, all you need to do is repost the question in the support form:
https://toolset.com/forums/forum/professional-support/
Chat will be instantiated if there is chat personnel available, otherwise, it will create a Ticket.

If you would like to proceed in a chat, unfortunately, I could not do this here.
Please let me know if you want to proceed here, some more details about your goal, so I can help you better.

Thank you!

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