Forums Forums Search & Filter Pro Not searching products correctly

Viewing 2 posts - 1 through 2 (of 2 total)
  • Anonymous
    #16015

    Hello,

    Just bought the plugin, the search form I’ve created sends to “WEBSITE/?sfid=2569&s=iphone”

    whereas it needs to go to “WEBSITE/?s=iphone&post_type=product” in order to come out in a grid like my theme does currently.

    Is there any way to do this? (basically it needs the &post_type=product for some reason).

    Many thanks

    Jonathan

    (p.s. I guess it can have the sfid=XXX stuff in there too, shouldn’t do any harm)

    Ross Moderator
    #16450

    Hi Jonathan

    You can’t add on custom parameters to the URL – the parameters are used by Search & Filter for searching…

    What is likely happening is somewhere in your template there is a check something like:

    if($post_type=="product")
    {
        //display grid
    }

    So you could add in an additional check:

    global $sf_form_data;
    if (($post_type=="product")||($sf_form_data->is_valid_form()))
    {
    
    }

    However it make look different in your theme.

    Thanks

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