Skip Navigation

[Resolved] Parametric search loop output does not display view with childeren correctly

This thread is resolved. Here is a description of the problem and solution.

Problem:
In the nested views, the child view does not display any post.

Solution:
Please check the child view, make sure it is using the post relationship filter:
Select posts that are a children of the current post in the loop

Relevant Documentation:
https://toolset.com/documentation/user-guides/querying-and-displaying-child-posts/

This support ticket is created 7 years, 11 months ago. 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.

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/Hong_Kong (GMT+08:00)

This topic contains 9 replies, has 2 voices.

Last updated by wardB 7 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#403415

I am trying to: Display a view with children in the loop output of a parametric search. To be precise the view created based on this topic: https://toolset.com/forums/topic/remove-tag-around-view/. The view works correctly in the "content template" of the parent and the "wordpress archive template" displaying the parent.

I visited this URL: Directly copying all the loop from the wordpress archive template to the paramtric search loop output does work for all content except that the child view does not find any posts.

I expected to see: list of child posts

Instead, I got: No children found

#403605

Dear Ward,

Could you describe detail steps to duplicate same problem?
1) How do you setup the parent view and child view? please take some screenshots for them,
2) How do you "Directly copying all the loop from the wordpress archive template to the paramtric search loop output"?
I need test and debug it in my localhost, thanks

And please edit the child view, check the filters:
Make sure there is the filter:
Select posts that are a children of the current post in the loop.

#403616
search page.PNG
view settings.PNG
View code.PNG
output loop para search.PNG
filter.PNG

Hi Luo, I did some further testing and simpified my parametric search and loopoutput. It still does not find the children though. However if I call the same view in a content template for WordPress Archives of the parent then the view works correctly. The same view also displays the child results correctly in the content template of the parent.

Please find the details in the figures atteched.

Algae products is a child of Algae product businesses.

#403625

Ow sorry forgot to adres your second point:

I first made a WordPress Archives content templates for this custom post type. These all display correctly. To add parametric search to my website I created a view with the filtering options, however the search results should look the same as the archive pages. Therefore I simply copied the content of the WordPress Archives content templates into the Loop Output area of the parametric search view.

Actually I found it rather strange that I could not replace the Loop output section in the parametric search view with the WordPress Archives templates I already created. As they use the exact same short codes etc..

Too further eloborate, I dont use the content template to group the Loop output because I use the loop to create two tabs. Tab one containing the post list en Tab two displays a Map with the post.

#403686

Could you duplicate same problem in a test site, and fill below private detail box with login details, also point out the problem page URL, and parent view URL, and the child view URL, I need a live website to test and debug, thanks

#404167

Hi Luo, my test site is a localhost could you create a test site for me?

#404315

You can duplicate same problem in our http://discover-wp.com, and put a link here, also point out the problem page URL and view URL, thanks

#404739

Hi Luo,

I have recreated the problem.

here is a link to the website:
hidden link

Link to normal archive that is displaying the view wit child content correctly:
hidden link

Link to parametric search page with exactly the same content, however does not display the view with child content correctly:
hidden link

Website only contains two views, one that displays child info and one that contains the parametric search.

Rregards,
Ward

#404940

Thanks for the details, I did below modification in your test site:
Edit the child view:
hidden link
in section "Query Filter", change the filter to:
Select posts that are a children of the current post in the loop.

Please test again, check if it is fixed.

#405000

Thanks Luo, that fixed my problem.

Regards,
Ward

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