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)