Forums › Forums › Search & Filter Pro › Taxonomies not being appended to search url
- This topic has 8 replies, 5 voices, and was last updated 9 years, 2 months ago by Anonymous.
-
Anonymous(Private) June 28, 2015 at 5:33 pm #20377
Hi – I just installed the Pro version with a new license key here: http://testnews.eesea.com/
When searching from the search form, if I select a category or tag, its not being appended to the search URL – so I keep getting a search page with all results.
Please help!
Thanks!
Anonymous(Private) June 30, 2015 at 10:40 pm #20530Hi Amy,
I’m not sure what terms you’re searching on, and I wasn’t sure what to try either since your content is still in development, so I searched on the word “Comedy”, and this is the URL displayed after the search is performed.
http://testnews.eesea.com/?s=comedy&sfid=7
So you see it is actually appending the search term, and I did get just a few posts returned.
Did you figure out and fix your problem already?
Anonymous(Private) July 7, 2015 at 9:28 pm #20948It does work correctly if you enter the keyword you wish to search, however, if you don’t enter a keyword, and select only the Comedy category from the menu, then search, the item chosen from the menu will not be appended to the search.
The resulting URL will be: http://testnews.eesea.com/?sfid=7
Instead of:
http://testnews.eesea.com/?sfid=7&_sft_category=comedyI’m unable to activate my new license key too – but I did go into my account here and manually add the site URL, so I guess it should be working?
Ross Moderator(Private) July 8, 2015 at 12:59 pm #21017Hi Amy
I think I see the problem – the JavaScript files for Search & Filter are not being loaded.
If you look in the source code you should see a reference to
search-filter-build.js
but this does not exist.You will then need to add the following to functions.php:
wp_register_script( 'search-filter-plugin-build', home_url("/wp-content/plugins/search-filter-pro/search-filter-build.js"), array('jquery', 'jquery-ui-datepicker'), '1.4.3' ); wp_localize_script('search-filter-plugin-build', 'SF_LDATA', array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'home_url' => (home_url('/')), 'sfid' => '' )); wp_register_script( 'search-filter-chosen-script', home_url("/wp-content/plugins/search-filter-pro/chosen.jquery.min.js"), array( 'jquery' ), '1.4.3' ); wp_enqueue_script( 'jquery-ui-datepicker' ); wp_enqueue_script( 'search-filter-plugin-build' ); wp_enqueue_script( 'search-filter-chosen-script' );
Thanks
Ross Moderator(Private) July 16, 2015 at 11:09 am #21539Hi Derrick
I’ve just made the answer visible for you to see.
Thanks
Anonymous(Private) July 16, 2015 at 6:11 pm #21568Ross you rock man! Solved all my problems! Just an FYI for others having this problem, the scripts were not loading correctly. I had to change the path of where the scripts are located to /public/assets/js/.
wp_register_script( 'search-filter-plugin-build', home_url("/wp-content/plugins/search-filter-pro/public/assets/js/search-filter-build.js"), array('jquery', 'jquery-ui-datepicker'), '1.4.3' ); wp_localize_script('search-filter-plugin-build', 'SF_LDATA', array( 'ajax_url' => admin_url( 'admin-ajax.php' ), 'home_url' => (home_url('/')), 'sfid' => '' )); wp_register_script( 'search-filter-chosen-script', home_url("/wp-content/plugins/search-filter-pro/public/assets/js/chosen.jquery.min.js"), array( 'jquery' ), '1.4.3' ); wp_enqueue_script( 'jquery-ui-datepicker' ); wp_enqueue_script( 'search-filter-plugin-build' ); wp_enqueue_script( 'search-filter-chosen-script' );
-
AuthorPosts