Forums Forums Search & Filter Pro Search Results, Conditional Tags and Woocommerce

Viewing 3 posts - 1 through 3 (of 3 total)
  • Ross Moderator
    #18597

    Hey Brian

    The conditional test for a S&F results page is something like:

    global $sf_form_data;
    	
    if ($sf_form_data->is_valid_form())
    {		
    	//do stuff
    }

    This might help – but I’m thinking – if you are displaying your results using a shortcode, why not just customise:

    http://www.designsandcode.com/wordpress-plugins/search-filter-pro/docs/display-results/with-a-shortcode/

    I’m sure there is something I’m missing but thought I’d suggest it.

    Thanks

    Anonymous
    #18832

    Perfect, thanks Ross! The conditional test worked perfectly.

    I am using a custom template and shortcode to display the results, but because of the global override I’m using for Woocommerce to display rows of 3 for everything else instead of 4, the only way to get the search and filter results to ignore that override seems to be using a conditional test.

    Cheers!

    Ross Moderator
    #18907

    Just to let you know this will be changing in v2.0 – haven’t decided on the exact name yet but more likely it will be something like:

    $searchandfilter->valid_form()

    Just a heads up anyway 🙂

    Thanks

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