Archived topic
Search field placeholder
9 replies · Started by themedleb on December 14, 2017
Is there a way to add placeholder to the search field?
Hi there,
Is this what you are looking for? https://docs.generatepress.com/article/generate_search_placeholder/
Thank you, I think it is what I'm looking for, so far I understood this:
add_filter( 'generate_search_placeholder', 'search_placeholder' );
function search_placeholder()
{
return 'hello';
}
Tried it but it showed nothing in the search field.
By the way I'm talking about the search field that is in the menu.
Thank you.
Ah for the navigation, check out the second example on this page: https://docs.generatepress.com/article/generate_navigation_search_output/
Thanks, it works.
You're welcome :)
Hi Tom,
How can I change the search placeholder text color (from primary menu)?
Please check http://bit.ly/2VsTD9c
ps. I've already tried to use this instructions but it didn't work in Google Chrome
https://generatepress.com/forums/topic/changing-the-text-color-of-the-search-bar/
Thanks
Try this CSS:
.navigation-search input[type="search"]::placeholder {
color: #ffffff;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know :)
Hi Leo,
It worked very well!
Thanks
No problem :)