Skip Navigation

[Closed] New View not recognizing relationship

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.

This topic contains 1 reply, has 1 voice.

Last updated by Christopher Amirian 4 weeks ago.

Assisted by: Christopher Amirian.

Author
Posts
#2825849
No filter option on other post types either.jpg
relationship 1.jpg
relationship 2.jpg
Tour Post relationship on Tour entry.jpg
Tour Template No filter option in view.jpg

I am trying to: DIsplay a list of blog posts in a tour template page. Not all of them; only the ones that are related via the relationship builder.

Link to a page where the issue can be seen:

I expected to see: When creating the Posts view in the Tours template, I expected to see the option under "Posts" that said "Posts that are related to the current Tour"

Instead, I got: No filter option on Posts (or any object type)... so all posts are showing on all tours

#2826043

Christopher Amirian
Supporter

Languages: English (English )

Hi,

Welcome to Toolset support. You’ll only see “related to the current post” as a View filter when three conditions are true:

1- There is a Toolset post-relationship between the two post types (your Tours ↔ Posts).

2- Your View is set to query the other side (here: query Posts, not Tours).

3- The View is rendered in a context where a single Tour is the “current post” (e.g. inside the single Tour Content Template), or you explicitly pass the Tour ID to the View.

Below is the quickest way to get only the blog posts related to the currently viewed Tour.

Inside the single Tour template (no shortcode params needed)

- Edit the Content Template used for single Tour posts.

- Insert a View block.

- In Content Selection, choose Posts (the built-in ‘post’ type).

- Open Query Filter → Add a filter → choose Post relationship or Repeatable field group owner.

- In the popup, pick your relationship (e.g. Tour–Post).

- Set: “Post is related to the current post in the main query” (wording can vary slightly).

- Design the loop. Save.

I suggest that you check the docs below for more information:

https://toolset.com/documentation/legacy-features/views-plugin/displaying-related-child-posts/

https://toolset.com/course-lesson/what-are-post-relationships-and-how-they-work/

https://toolset.com/course-lesson/how-to-set-up-post-relationships-in-wordpress/

Thanks.

The topic ‘[Closed] New View not recognizing relationship’ is closed to new replies.