Forums › Forums › Search & Filter Pro › Add S&F on variable custom loop
- This topic has 5 replies, 2 voices, and was last updated 7 years, 7 months ago by Trevor.
-
Anonymous(Private) March 31, 2017 at 9:57 am #100598
I have single pages of a post type which is also a taxonomy (created with CPT-onamies) and on these pages I want to show the default WordPress post type
post
s which have the term of that specific single page. The taxonomy/CPT is calleddossier
and there are 21 terms in this taxonomy, thus I have 21 single pages on which I want to showpost
with that specificdossier
. I rather not want to create 21 custom search & filter shortcodes, because this 21 can be 30 next week and also this would need to have an hell of an if statement.My loop looks like this https://gist.github.com/mvaneijgen/f8f7d694725c6d6f97b834d6f13b88a8 which as a variable called
$post_slug
which is the name of the term inside the taxdossier
. and my url isdomain.com/dossier/TERM-SLUG/
which I need to inlcude in the S&F settingsDisplay results
>Template Options
>Results URL:
but to my knowledge I can not use variables in there or some sort of regex snippet.How would I go about including S&F on these pages without having to create a custom S&F for each term.
Trevor(Private) March 31, 2017 at 8:42 pm #100704I would imagine much the same way as the user in this post:
https://support.searchandfilter.com/forums/topic/setting-a-filter-value-on-shortcode/
-
AuthorPosts