Saltar navegación

[Resuelto] 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 -

Zona horaria del colaborador: Asia/Kolkata (GMT+05:30)

Este tema contiene 1 respuesta, tiene 1 mensaje.

Última actualización por Minesh 1 year, 2 months ago.

Asistido por: Minesh.

Autor
Mensajes
#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: enlace oculto

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
Colaborador

Idiomas: Inglés (English )

Zona horaria: 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:
=> enlace oculto
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:
=> enlace oculto
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:
- enlace oculto

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:
=> enlace oculto

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/