Skip Navigation

[Resolved] Nested view don't show on page (only on template)

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by marF 10 months, 4 weeks ago.

Assisted by: Waqar.

Author
Posts
#2611329

Hi!

I created a nested view. This legacy view works fine on a template but don't show results when I put it on a page (No items found).
The name view is "sortides llistat prova". The page where the view should be seen is "Sortides al Liceu".
What am I setting up incorrectly?

Thanks!

#2611469

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

From the description, it seems that the view's query filter section includes a query that is set to work when the context is the single post page (through the content template). This would explain why the results are not shown when the view is called on a standalone page directly.

If you could share temporary admin login details, I'll be in a better position to examine the setup and suggest a way to make it work from a page too.

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

#2611983

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for sharing the access details.

On the page 'Sortides al Liceu', the 'No items found' message is showing from the nested view 'Opera sortides classic'.

You'll need two changes in the query filter section to work on this page:

1. The post-relationship query filter option will need to be switched from "The post where this View is shown" to "The current post in the loop".

Important note: As this view is called on different pages with different scopes, after this change it will not work where it is not nested inside another view.

In a case like this where a view needs to be reused in different scopes, it is a good idea to change the relationship query filter option to 'The post with ID set by the shortcode attribute: wpvrelatedto'. And then wherever that view needs to be called, it should be called through the shortcode and not the 'Views' block:


[wpv-view name="Opera sortides classic" wpvrelatedto="[wpv-post-id]"]

You can load this shortcode in a 'Fields and Text' block. The attribute value '[wpv-post-id]' will set the target post for the relationship to the one where this view is called, whether it is inside another view's loop or directly inside a content template.

2. The taxonomy 'Etiquetes d'activitats' is not complete, so it should be removed. It has the option 'Any of the following' selected, but no terms are actually specified.

I hope this helps and please let me know if you have any follow-up questions.

#2612211

My issue is resolved now. Thank you Waqar!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.