Forums › Forums › Search & Filter Pro › Shortcode results: don't display results until click
Tagged: shortcode
- This topic has 20 replies, 3 voices, and was last updated 8 years, 3 months ago by Anonymous.
-
Ross Moderator(Private) July 31, 2016 at 3:49 pm #52833
Hey Will
I took a look – to me it seemed like it was working pretty much, although there was one thing I noticed which may be the issue you were having.
Essentially, when there are no results or nothing has been selected, you will get a “no results” message.
I guess what you wanted was to have a blank page before searching (not a “no results” message”) and then show “no results” only when a filter has been selected AND there are no results.
In this case I’ve modified your template slightly.
You’ll see that the first check is on
is_filtered
, and if its not, you will see an else condition at the bottom with some text commented out.If it is filtered, then it goes and performs the loop – and inside there there is another check to see if there are actually any results.
Hope that helps – looks like its working to me!
Best
-
AuthorPosts