Forums Forums Search & Filter Pro No initial results

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #41975

    Hi,

    I have a question I am hoping has a quick answer that I have missed in the options.

    I am trying to put the search/filter box on my page via shortcode and have the results shortcode show up directly underneath. (This is working perfectly)

    However, I would like no immediate results to load in the results short code. Meaning, when the page loads, I want the search box to appear with no results (right now, it’s showing all posts, waiting for me to filter.) Is there a way to only have the results shortcode fill when someone selects a filter above? I have content underneath the results, which is why I would like that to show initially in the event that someone doesn’t want to filter the pots.

    Thank you very much for your help.
    Zach Sykes
    803-292-1584
    zsykes@octagonsolutions.net

    Trevor
    #42025

    I have no doubt that it can be done, but I am unsure whether S&F has a code filter/action that allows this, or whether you would need some coding around the shortcode to only place the results conditionally (maybe by examining the url of the page to see if a get query is attached).

    Ross may need to answer this, so I will ping him on this query to see if he has any thoughts.

    Ross Moderator
    #42037

    Hi Zach

    There is no functionality for this built in but if you are able to do some coding this is possible.

    Basically you would need to edit your results template and check to see if anything has been filtered before displaying any results (the have_posts loop)

    Hope that helps

    Thanks

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