Skip Navigation

[Closed] Filter posts (custom search) in nested view by related posts

This support ticket is created 2 years, 5 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 4 replies, has 3 voices.

Last updated by Luo Yang 1 year, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#2345121
Captura de Pantalla 2022-04-20 a las 11.24.13.jpg

Hello.

I have a nested view with taxonomies ans posts.

The view of posts show a related post.

I'd like to filter posts by related posts, but I can't because filter with related posts is only avalaible in view of posts, not in view of taxonomies like as (see the attached image)

Filter all wines (nombolles, blancs, negres with D.O Ribera del Duero.

I tried with an archive with nested views and there i coud insert a dropdown to filter by related posts, but that dropdown non't filter anything when I clicked it.

Is there any way to get this?

I attach ans screenshot.

#2345279

Hi,

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

What you're planning to achieve will require some workaround. Can you please share temporary admin login details, along with the page where these nested views can be seen?

I'll be in a better position to guide you with the next steps, accordingly.

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

regards,
Waqar

#2359491

Hi,

I'm re-opening this ticket and your next reply will be private.

Please share temporary admin login details, along with the page where these nested views can be seen.

regards,
Waqar

#2360725

Thank you for sharing the admin access.

Here are the steps that you can follow:

1. In the child post view "Vista de vins no exclusius", you'll add the search field for the related posts (and any other search fields, if needed), as you would in a standalone view.

Important note: For this setup to work, it is important that the view's search is set to update the results with a page refresh on submit button's click and not using the AJAX.

2. At this point, the nested views will be showing both the search form and the search results.

You can update this shortcode used in the parent taxonomy view, from:


[wpv-view name="vista-de-vins-no-exclusius"]

To:


[wpv-view name="vista-de-vins-no-exclusius" view_display="layout"]

This new shortcode will only show the search results and not the search form.

3. To show a common search form from the post view on top of the taxonomy view, you can place this shortcode above the shortcode for the taxonomy view:


[wpv-form-view name="vista-de-vins-no-exclusius" target_id="self"]

When the search form will be used and the page will refresh, the search filter would be applied to all the instances of the nested post views.

I hope this helps and please let me know how it goes.

#2571839

Ticket reopened, please update here if you still need assistance for it.

The topic ‘[Closed] Filter posts (custom search) in nested view by related posts’ is closed to new replies.