It's ok but another question…

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

This topic contains 5 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years ago.

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

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

    // 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;
    }}

    <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 Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

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

    Best,
    Ernest Marcinko

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


    #12447
    Laurent Le Ny
    Laurent 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 Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

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

    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; }

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

    Best,
    Ernest Marcinko

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


    #12475
    Laurent Le Ny
    Laurent Le Ny
    Participant

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

    #12480
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


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

The topic ‘It's ok but another question…’ is closed to new replies.