Reply To: How to turn off for mobile but then use built in search

Home Forums Product Support Forums Ajax Search Pro for WordPress Support How to turn off for mobile but then use built in search Reply To: How to turn off for mobile but then use built in search

#8490

Ernest Marcinko
Keymaster

Hi!

Indeed, that option is not working correctly, it should display the default engine if it's checked. I'm planning to extend that options page, whit more settings.

I think the best solution would be to suggest you a temporary fix for the issue with the theme search replacement. Open up the wp-content\plugins\ajax-search-pro\includes\classes\filters\class-asp-formoverride.php file, it's a small file, and replace this code:

function handle( $form = "" ) {
    $asp_st_override = get_option("asp_st_override", -1);

    if ( $asp_st_override > -1 && wd_asp()->instances->exists( $asp_st_override ) )
        return do_shortcode("[wpdreams_ajaxsearchpro id=".$asp_st_override."]");

    return $form;
}

with this code:

function handle( $form = "" ) {
    $asp_st_override = get_option("asp_st_override", -1);

    if ( $asp_st_override > -1 && wd_asp()->instances->exists( $asp_st_override ) ) {
        $new_form = do_shortcode("[wpdreams_ajaxsearchpro id=".$asp_st_override."]");
        if ( strlen($new_form) != 0 )
          return $new_form;
        else
          return $form;
    }

    return $form;
}

I hope it works.

Best,
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)