Forums Forums Search & Filter Pro Taxonomies not being appended to search url

Viewing 9 posts - 1 through 9 (of 9 total)
  • Anonymous
    #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
    #20530

    Hi 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
    #20948

    It 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=comedy

    I’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
    #21017

    Hi 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

    Anonymous
    #21346

    Finally got it working! Thanks!

    Anonymous
    #21505

    I am having this same problem, how did you get this to work?

    Ross Moderator
    #21539

    Hi Derrick

    I’ve just made the answer visible for you to see.

    Thanks

    Anonymous
    #21568

    Ross 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' );
    Anonymous
    #24185

    Thanks Derrick!
    Your code fixed my problem.

Viewing 9 posts - 1 through 9 (of 9 total)