Looking for support? You can access the support system via your account.
- This topic has 7 replies, 2 voices, and was last updated 4 years, 2 months ago by .
The topic ‘Dropdown search for taxonomy showing empty terms’ is closed to new replies.
Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › Dropdown search for taxonomy showing empty terms
Tagged: dropdown, taxonomy, Taxonomy search
Hi –
I have the settings for my drop-down search set up to Hide Empty Terms. However, when I open the dropdown there are terms that are returning no results. I have updated the plugin to the latest version (2.5.0) and I even went in and updated the search and rebuilt the cache, but it is still returning empty terms in the dropdown. You can see an example here when you select (at the bottom of the page) Publishing & Broadcasting from the dropdown: https://sprouthouseagency.com/results
Let me know if I need to create you a back end login as well to look at the settings. I appreciate any help you can provide on this matter.
Thanks!
Is Auto Count (both settings) also ON?
Hi Trevor — Thank you. When I turned this on, it did work. It removed the options that did not have results. However, it also removed the Combobox Script for select2 upon doing the first selection from the drop-down. I have turned it back off on the live site because I do not want the styles to be gone for the live site. However, it is definitely removing that upon searching the first time which makes it look pretty terrible. Do you have a solution for this? Thank you!
If that doesn’t happen if you turn Ajax OFF, AND if you apply those styles using JavaScript (jQuery), then you need to apply them after our Ajax triggers, which can happen after 2 events;
sf:ajaxformfinish -> after Auto Count runs to update numbers
sf:ajaxfinish -> after the form submits
Sample snippet:
<script type="text/javascript">
$(function(){
$(document).on("sf:ajaxfinish", ".searchandfilter", function(){
console.log("ajax finish");
// your code
});
}(jQuery));
$(function(){
$(document).on("sf:ajaxformfinish", ".searchandfilter", function(){
console.log("ajax complete");
// your code
});
}(jQuery));
</script>
Hi Trevor — Thank you for your help, I think at this time it is becoming a bit more work than we would like to do to get this back running properly. Such a bummer that the plugin doesn’t work the way it seems like it should based on the settings. I have just set up a jQuery function after the ajax runs for if it returns no results to put a message on the screen. Thanks for your help though!
Thanks for getting back to me. I will close this thread for now.
The topic ‘Dropdown search for taxonomy showing empty terms’ is closed to new replies.
© 2024 Search & Filter Support. All Rights Reserved.
This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
We also use cookies to store items in your cart as well as allowing your to login on the site.
You can adjust all of your cookie settings by navigating the tabs on the left hand side.
By continuing to use this site, you also agree to our Privacy Policy.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
*Other cookies used for logging in and cart functions will only be used when you use those features and cannot be disabled.
If you disable these cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
More information about our Cookie Policy