Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    can you paste a link to your website here so i could take a look at it?

    Thread Starter hs_sh

    (@hs_sh)

    Hi,

    yes, here is the link : https://caribfind.enterprise-esolutions.com/classifieds/

    Thank you

    Plugin Author Greg Winiarski

    (@gwin)

    Please try adding the code below in your theme functions.php file, then go to page with [adverts_list] shortcode and try searching again.

    
    add_filter("adverts_form_load", "change_query_param_name");
    add_filter("adverts_list_query", "change_query_search");
    function change_query_param_name( $form ) {
        if( $form["name"] != 'search' ) {
            return $form;
        }
    
        foreach( $form["field"] as $i => $field ) {
            if($form["field"][$i]["name"] == "query") {
                $form["field"][$i]["name"] = "advert-query";
            }
        }
    
        return $form;
    }
    function change_query_search( $args ) {
        if( adverts_request( "advert-query" ) ) {
            $args["s"] = adverts_request( "advert-query" );
        }
    
        return $args;
    }
    
    Thread Starter hs_sh

    (@hs_sh)

    Hi,
    Thanks for your reply!
    I added it, but unfortunately the issue persists.

    Plugin Author Greg Winiarski

    (@gwin)

    Hi, hmm in this case, the only solution I can propose is to disable plugins one by one and see if the error goes away, it won’t, try switching a theme for a while and see if this helps.

    Basically this looks like some conflict with one of plugins (or theme) you are using, which overwrites each WP_Query with some custom param which break the search query.

    I have this same issue with my site (otherwise works brilliantly) – I have narrowed down the plugin to Beaver Builder Header Footer – which sadly I need to get the headers and footers showing on the site.

    Is there a work around to this as I know which plugin is causing the conflict?

    Thank you.

    Just a follow up —

    I realised I have a different issue it’s not the search that is not returning a result – in fact that works fine, it’s the category search that does not return a result.

    https://www.ads-software.com/support/topic/search-by-category-not-working/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Search by keywords’ is closed to new replies.