Skip Navigation

[Resolved] Relationship does not appear in Content Template embedded in a view

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 6 replies, has 2 voices.

Last updated by Minesh 1 year, 4 months ago.

Assisted by: Minesh.

Author
Posts
#2623929

Tell us what you are trying to do?

Show a list of speakers related to a session in a search view

1. Created a one-to-many relationship between `session` and `speaker`
2. Linked a `Speaker` to a `Session`
3. Created a `Session` Content Template which contains:
- Session title
- An embedded `Session Speakers` View which lists the Speakers related to the Session
4. Created an `Agenda` search View that contains the `Session Speakers` Content Template in the View Loop

Problem

When viewing the front end of the `Session` Content Template, associated speakers are shown. However, when viewing the `Agenda` search view, Speakers show No items found.

All Custom Post Types, Custom Fields and Relationships are managed in Toolset

Is there any documentation that you are following?

Toolset docs on views and relationships

What is the link to your site?

hidden link (admin/admin)

#2623949

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

You can not use view-inside-view using view block. You have added the view block `Session Speakers` that is added to the content template of session and later you added this content template to your another view's loop `Agenda` search view thats not possible.

Can you please tell me what details exactly you want to display where with what post type single content template and I would be happy to guide you in the right direction.

The custom search view you want to display on session single post or speaker single post?

#2623951

I understand. However, I find it strange that the UI allows this if some software limitation prevents it.

The website is for a conference. I want to show a search view with a list of Sessions and their associated Speakers. The search page is necessary to filter Session by Day and Stage (taxonomies)

Ex:
Session 1
- Speaker A

Session 2
- Speaker A
- Speaker B

Session 3
- Speaker C

#2624013

Minesh
Supporter

Languages: English (English )

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

The search page is necessary to filter Session by Day and Stage (taxonomies)
==>
Do you mean you want a new page where you will add this view that will allow you to display list of session with its associated speakers?

#2624027
#2624081

I see what you're saying. The Agenda page could be replaced with the Sessions archive, indeed.

I created the Sessions Archive page but nothing appears.

#2624107

Minesh
Supporter

Languages: English (English )

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

Can you please check now: hidden link

I've created the following view "session-related-speakers" that will display the session related speakers:
=> hidden link
To the above view, I've added the following post relationship query filter.

 Filter by post relationship or repeatable fields group owner
Select posts in a Schedules Speakers relationship that are a related to the current post in the loop.

And added the above view using the "Fields and Text" block within your block view's loop:
- hidden link

Please check now how its get displyaed:
- hidden link