Forums › Forums › Search & Filter Pro › The same filter on different page templates?
Tagged: custom query, different pages, same filter, V3
- This topic has 3 replies, 2 voices, and was last updated 5 years ago by Trevor.
-
Anonymous(Private) October 22, 2019 at 10:39 pm #224426
Hi, I have applied the Search & Filter Pro shortcode to filter custom queries which works fine. But now I have a use case where there are multiple pages where the the same filter must be applied.
So let’s say I have page1, page2, page3 etcetera with a custom query and the results are shown on the same page. So filter results of page1 are shown on page1. Filter results of page2 are shown on page2, etcetera>
Also, they need the same filter. Using the shortcode method is than problematic because in the filter I have to specify the results page and that differs (It’s page1, page2, page 3, etcetera). So, to make this work with the shortcode method, I have make a filter for every page. Of which in this case there are too many.I guess there must be a better way to get this working. So that I can use just one filter for all these pages. Can you point me in the right direction to get this working?
thanks, Han
Anonymous(Private) October 24, 2019 at 8:08 am #224502Hi Trevor, thanks, good to know.
I was thinking a bit more about it. If I manage to adapt (or duplicate and adapt) this shortcode function [searchandfilter id=”xxx”] to pick up on a modified results url.
Something like the results url in the filter (https://domain.com/pagename/) with a fixed pageslug plus a variable subpage slug.
https://domain.com/pagename/{subpagename}Do you think that might work?
Or will that mess up things severely?thank you, Han
-
AuthorPosts