Forums Forums Search & Filter Pro Add S&F on variable custom loop

Viewing 6 posts - 1 through 6 (of 6 total)
  • Anonymous
    #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 posts which have the term of that specific single page. The taxonomy/CPT is called dossier and there are 21 terms in this taxonomy, thus I have 21 single pages on which I want to show post with that specific dossier. 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 tax dossier. and my url is domain.com/dossier/TERM-SLUG/ which I need to inlcude in the S&F settings Display 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
    #100704

    I would imagine much the same way as the user in this post:

    https://support.searchandfilter.com/forums/topic/setting-a-filter-value-on-shortcode/

    Anonymous
    #100823

    Thanks Trevor, this seems like it is pointing me in the right direction. I’ll test it out next week, again thanks for the info!

    Trevor
    #100832

    Do you want me to leave this thread open or close it?

    Anonymous
    #100959

    @Trevor I was looking for the “I don’t need any further assistance” button, but couldn’t find it (maybe nice addition to this forum?), but you can close this thread.

    Trevor
    #100961

    We did have one, but 75% of the time the user didn’t mean to press it, and it was hard work to re-open the threads so many times. Thanks for letting me know 🙂

Viewing 6 posts - 1 through 6 (of 6 total)