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 7 years ago.
- AuthorPosts
- March 23, 2017 at 2:15 pm #12430
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….
March 23, 2017 at 2:16 pm #12431Hi,
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 :)
March 23, 2017 at 8:30 pm #12447Thank 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 ?
March 24, 2017 at 1:58 pm #12462Hi,
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 :)
March 25, 2017 at 7:10 pm #12475Perfect thank you very much . It’s work like a charm !!!
March 27, 2017 at 8:43 am #12480You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
The topic ‘It's ok but another question…’ is closed to new replies.