Passer la navigation

[Résolu] CPT Relationship Content Template not loading within Elementor Loop Grid

This support ticket is created Il y a 1 year, 2 months. 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 -

Fuseau horaire du supporter : Asia/Kolkata (GMT+05:30)

Ce sujet contient 1 reply, a 1 voix.

Dernière mise à jour par Minesh Il y a 1 year, 2 months.

Assisté par: Minesh.

Auteur
Publications
#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: lien caché

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

Les langues: Anglais (English )

Fuseau horaire: 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:
=> lien caché
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:
=> lien caché
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:
- lien caché

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:
=> lien caché

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/