Skip Navigation

[Resolved] Displaying related posts

This support ticket is created 7 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 4 replies, has 3 voices.

Last updated by tristaD 7 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#490253

I am working on a magazine-style website. The client has their issues set up based on category. I have created a custom post type called "Issues" and created a parent/child relationship with all the articles in the issue.

On individual articles, I would like to show related posts specific to the issue it belongs to, not related posts from anything on the whole site.

I think this URL was closest to helping me, but the guy asked for help and there were no replies: https://toolset.com/forums/topic/display-related-posts-in-a-single-post-view/

Just for clarity:

All posts are children of post type "Issue" and assigned based on which issue they are in.

I want to create a related posts view only within the children of that issue on a post.

I can't seem to make it work.

URL of where it's happening: hidden link

Can you help?

#490442

Nigel
Supporter

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

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

Hi Trista

You want to display sibling posts, i.e. posts which have the same parent issue.

There is a description of how to do that here: https://toolset.com/documentation/user-guides/displaying-related-child-posts/

The key here is that you can add a filter to a View to output posts which are children of the current post. But when you are viewing a child post, the parent post is not the current post. For the parent post to be the current post, you create a Content Template for the parent post type and add that to your child post content template, referencing it using the id attribute.

It will hopefully make sense when you read through the docs, but if you have a problem, let me know.

#491011

Hi Nigel. Thanks for your answer. I'll take a look through the docs and see if it makes more sense (since right now, not at all).

I'll leave this open for now. I will be delivering this to my client by Feb 22, so you'll hear back from me before then.

Thanks again!

#491343

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Nigel is on vacation. This is Minesh here and I'll take care of this ticket and try to help you further.

Please do not hesitate to get in touch with us with your queries, if any.

#493372

Hi! Thanks so much for this. I worked through the tutorial and it's working wonderfully. Thanks so much for the help!

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