Skip Navigation

[Resolved] How to add flexibility to pick when showing related posts for a custom post type

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

Problem: I would like to add a View to my post template. That View should show related posts. How can I set this up in Toolset?

Solution: The easiest way to set this up is to apply the same taxonomy term to all related posts. Then use a View filtered by taxonomy, set by the current post.

If you want to hand-pick related posts, use a post ID filter instead, set by a shortcode attribute. Pass in the related post IDs using that shortcode attribute.

This support ticket is created 4 years, 2 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by puneetS-3 4 years, 2 months ago.

Assisted by: Christian Cox.

Author
Posts
#1505291

I have created a custom post type using toolset post-type named article. I have created a single page template for article, where I have a section called "Related Articles." In this section, I would like to build a functionality where I can decide/pick, what all articles should be displayed.

How can I achieve this using toolset ?

#1505667

Hello, the easiest way to set this up is to apply the same taxonomy term to all the similar posts. Then you can create a View filtered by taxonomy, set by the current post or page. You could create a custom taxonomy to store the similar post terms, or you could use an existing taxonomy.

There is not currently a way to use Toolset's post relationships to relate posts in the same post type, so there is not a simple solution using post relationships. For a more manual solution, you can create a View filtered by post ID, and pass the related post IDs into the View using a shortcode attribute. Let me know if you have questions about these solutions.

#1507005

Thank you!

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