Forums › Forums › Search & Filter Pro › Filters is not working and shows ALL results
Tagged: filter
- This topic has 20 replies, 2 voices, and was last updated 9 years, 9 months ago by
Trevor.
-
Trevor(Private) July 14, 2016 at 2:09 pm #51159
Sorry, you can remove that last defer, I got it from my site code.
Whatever you did, it is not loading those HTML snippets into the page (you can view the page source and see that they are not there).
You will need to ask the author of the theme how to add these so that they load in the header.
Trevor(Private) July 14, 2016 at 3:04 pm #51173Ah, I see. In your page I can see JQuery being loaded in the footer (something that is not normally done in a WordPress theme as doing so will break a lot of jQuery scripts, including ours). It is being loaded with this line:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>I am assuming that as it loads after our scripts, this causes an error, as our script is dependent on jQuery. Either jQuery needs loading before our script, or our script needs loading after the jQuery script. I can see this because in the page inspector (in Chrome or whatever browser you use), in the console, I can see this error:
ReferenceError: JQuery is not definedand it refers to our script.
This type of issue may happen again as the theme is hand written and will need a lot of maintenance in the future. For example, I can see you have yet to upgrade to WP 4.5.3.
It is why so many users choose a pre-made theme or theme framework for their sites.
Trevor(Private) July 14, 2016 at 6:25 pm #51213As I said, it has to be loaded after jQuery loads.
I assume you paid a developer to make the site for you? Did you ask him/her to make it hand coded? It seems a curious choice when there are theme frameworks available, at least one of which could have made this site without much difficulty.
If you have access to the server file manager and look inside the wp-content/themes folder, find the folder named after the theme, is there a file in there named functions.php?
Anonymous(Private) July 15, 2016 at 8:16 am #51259Hi Trevor,
IT WORKS! The important hint was to load the script after jQuery loads. I placed
<script type='text/javascript' src='.../wp-content/plugins/search-filter-pro/public/assets/js/search-filter-build.min.js'></script>in the footer instead of the header.
MANY THANKS for the GREAT support.
We will by more licenses soon, as it is a great plugin with lots of great opportunities!
Cheers, Thorsten
-
AuthorPosts