Skip Navigation

[Resolved] CPT Relationship Content Template not loading within Elementor Loop Grid

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 1 reply, has 1 voice.

Last updated by Minesh 1 month, 4 weeks ago.

Assisted by: Minesh.

Author
Posts
#2800629
Screenshot-2025-03-13-at-15.24.35.png
Screenshot-2025-03-13-at-15.24.21.png

I am trying to: load a CPT Relationship Content Template within an Elementor Loop Grid. It seems to be working in the backend, but not the front end. Please see images uploaded.

Link to a page where the issue can be seen: hidden link

I expected to see: A list of related Clients and a list of related Agencies for each project.

Instead, I got: "No Items Found" message

#2801111

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

First of all, I've enable the legacy view:
=> https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/#enabling-legacy-views

Then I've created the following view:
- To display related project Agencies:
=> hidden link
Where:
- I've added the Query Filter for post relataionship to filter the view result with view's shortcode attribute:

Filter by post relationship or repeatable fields group owner
Select posts in a Projects Agencies relationship that are related to the Post with ID set by the shortcode attribute relatedagency.
eg. [wpv-view name="view-name" relatedagency="123"]

- To display related project Clients:
=> hidden link
Where:
- I've added the Query Filter for post relataionship to filter the view result with view's shortcode attribute:

Filter by post relationship or repeatable fields group owner
Select posts in a Projects Clients relationship that are related to the Post with ID set by the shortcode attribute relatedclient.
eg. [wpv-view name="view-name" relatedclient="123"]

I'm only displaying post title with link with both of the above view, you can adjust the view's loop output as required for both of the above views.

Then with your Elementor's template:
- hidden link

I've added the "Text" Module and added both of the above view's as given under:

[wpv-view name="related-project-agency" relatedagency="[wpv-post-id]"]

[wpv-view name="related-project-clients" relatedclient="[wpv-post-id]"]

Can you please confirm it works as expected:
=> hidden link

More info:
- https://toolset.com/documentation/legacy-features/views-plugin/passing-arguments-to-views/#controlling-the-filter-with-shortcode-attributes
- https://toolset.com/documentation/legacy-features/views-plugin/