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

It's ok but another question…

Home Forums Product Support Forums Ajax Search Pro for WordPress Support It's ok but another question…

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12430
    Laurent Le NyLaurent Le Ny
    Participant

    ok i have the answer sorry like this , it’s work :

    [code]// prefilled input search ajax search pro for titles by Laurent LE NY
    add_filter( ‘asp_print_search_query’, ‘asp_change_search_text’, 1, 1);
    function asp_change_search_text( $text ) {
    if (is_page_template(‘template-home.php’)|| is_404()|| is_page(‘rechercher’)) { // <==pages/templates à exclure pour le placement du titre dans l’input search
    remove_filter( ‘asp_print_search_query’, ‘asp_change_search_text’ );
    return $text;
    } else {
    $s = get_the_title();
    if ( !is_wp_error($s) && !empty($s) )
    return $s;
    return $text;
    }}[/code]

    <span class=”code”>but i have another question :</span>

    How to remove the text by default “search here”
    When users clicks in the search bar?

    Sorry for my bad english….

    #12431
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    You can change that text on the back-end: http://i.imgur.com/Aulqcey.png

    #12447
    Laurent Le NyLaurent Le Ny
    Participant

    Thank you but I have expressed myself wrong in my question, how to make disappear the text “search here ..” when the user clicks in the search bar ?

    #12462
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi,

    I’ve looked it up, and it is possible, with a small custom CSS snippet:

    [html]input:focus::-webkit-input-placeholder { color:transparent !important; }
    input:focus:-moz-placeholder { color:transparent !important; }
    input:focus::-moz-placeholder { color:transparent !important; }
    input:focus:-ms-input-placeholder { color:transparent !important; }[/html]

    Basically this will change the input placeholder texts color to transparent, whenever it’s focused.

    #12475
    Laurent Le NyLaurent Le Ny
    Participant

    Perfect thank you very much . It’s work like a charm !!!

    #12480
    Ernest MarcinkoErnest Marcinko
    Keymaster

    You cannot access this content.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘It's ok but another question…’ is closed to new replies.