Navigation überspringen

[Gelöst] CPT Relationship Content Template not loading within Elementor Loop Grid

This support ticket is created vor 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 -

Zeitzone des Unterstützers: Asia/Kolkata (GMT+05:30)

Dieses Thema enthält 1 reply, hat 1 Stimme.

Zuletzt aktualisiert von Minesh vor 1 year, 2 months.

Assistiert von: Minesh.

Author
Artikel
#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: versteckter 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
Unterstützer

Sprachen: Englisch (English )

Zeitzone: 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:
=> versteckter 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:
=> versteckter 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:
- versteckter 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:
=> versteckter 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/