Forums › Forums › Search & Filter Pro › Results shown although no filter set, yet
- This topic has 5 replies, 2 voices, and was last updated 10 years, 4 months ago by
Ross.
-
Ross Moderator(Private) July 9, 2015 at 12:33 pm #21114
Hey again 🙂
You’re not doing anything wrong, I’m thinking of actually adding this in as an option in the admin, but its really not too difficult to implement.
What you would need to do is hide the div initially with CSS – which would be either
.search-filter-resultsor#search-filter-results-1234Then you would need to display the results after the search has been initiated – you can do this with JS by attaching an event listener to detect when a search has completed:
http://www.designsandcode.com/wordpress-plugins/search-filter-pro/faqs/
$(".searchandfilter").on("sf:ajaxfinish",function(){ console.log("ajax search complete"); //so load your lightbox or JS scripts here again });Thanks
Ross Moderator(Private) July 9, 2015 at 1:35 pm #21130True, in that case you will have to wait for the option where no query is even performed until user interaction.
In some scenarios it would be an advantage to have extra searchable content, rather than empty space.
Anonymous(Private) July 10, 2015 at 8:12 am #21177I agree, both approaches are useful and in fact we need both:
A) Global search form –>Show nothing initially
B) News Corner –> Shown all news, let visitor drill down by category
So, a switch per FORM would be most appropriate and I would believe it would not be so hard for the developers to add this extra option that is handled in a small IF in the rendering…..Ross Moderator(Private) July 10, 2015 at 12:36 pm #21198You’re right its not hard at all 😉 Will be looking to add this in!
-
AuthorPosts