This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

search value from wordpress search showing as plugin search value (2 forms page)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9731
    gab1982gab1982
    Participant

    Hi I have implemented your pro search plugin and its great however I am trying to use this in conjunction with a custom wordpress search (people search), if I type a value into the people search area then press enter, the value I typed into the people search area appears as the value for your plugin, I have attached a screenshot for you alternatively you can see for yourself:

    http://www.bbdimension.com/files/wp6/?search-type=people&s=test&submit=Search

    I can’t work out what the issue is.

    Please let me know, thank you.

    #9733
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    It’s not an issue, it’s an intended behavior, because the search query variable “s” is set, which is globally used, so ajax search pro recognizes and prints it as expected. You can see it in the URL as well: &s=test

    Since you provided FTP details, I’ve made a quick modification to recognize the people search. I’ve changed the wp-content\plugins\ajax-search-pro\includes\views\asp.shortcode.probox.php file lines 78-81, which is:

    [html]<input type=’search’ class=’orig’
    placeholder='<?php echo asp_icl_t( "Search bar placeholder text" . " ($real_id)", w_isset_def($style&#91;’defaultsearchtext’&#93;, ”) ); ?>’
    name=’phrase’ value='<?php if ( !isset($_GET&#91;’search-type’&#93;) ) echo get_search_query(); ?>’
    autocomplete="off"/>[/html]

    to:

    [html]<input type=’search’ class=’orig’
    placeholder='<?php echo asp_icl_t( "Search bar placeholder text" . " ($real_id)", w_isset_def($style&#91;’defaultsearchtext’&#93;, ”) ); ?>’
    name=’phrase’ value='<?php echo get_search_query(); ?>’
    autocomplete="off"/>[/html]

    Now the phrase should not appear anymore if the staff search is used.

    #9735
    gab1982gab1982
    Participant

    great and thanks for the fast reply and fix 🙂

    #9736
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Since this code will be overwritten in case of an update, I’m adding a way to resolve this in the upcoming release. In case you update in the future, just put this code to the functions.php file in your active theme directory:

    [php]add_filter(‘asp_print_search_query’, ‘asp_change_query_cond’, 1, 1);
    function asp_change_query_cond( $q ) {
    if ( isset($_GET[‘search-type’]) )
    return "";
    return $q;
    }[/php]

    If you don’t mind, I will close this topic and mark it as resolved for now, feel free to open another one if you have other issues.

    If you like the plugin, feel free to rate it on your codecanyon downloads page, it’s greatly appreciated.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘search value from wordpress search showing as plugin search value (2 forms page)’ is closed to new replies.