Problems as soon as ajax is activated

Forums › Forums › Search & Filter Pro › Problems as soon as ajax is activated

Tagged: 

Viewing 4 posts – 11 through 14 (of 14 total)
  • Trevor
    #188777

    Check the body tag to see if it has any unique classnames added. Most theme pages do, if only to name the page or template.

    Anonymous
    #188785

    I did already think I would find an page-id or something related to s&f but it looks pretty standard

    <body class=”blog wp-custom-logo woocommerce-no-js page-template-template-fullwidth-php right-sidebar woocommerce-active”>

    Trevor
    #188787

    Otherwise you would have to dig in and edit the template code to add a classname somewhere appropriate. You CAN use PHP to detect if a search has been made, like this (change the ID number to match your form – the get_search_term part is only needed if you have a text search field):

    global $searchandfilter;
    $sf_current_query = $searchandfilter->get(1234)->current_query();
    if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) {
      // code if no search made
    } else {
      // code if search made
    }
    Anonymous
    #188789

    GREAT !

    Thanks Trevor !

Viewing 4 posts – 11 through 14 (of 14 total)
Search & Filter Support
Privacy Overview

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.