You can change the default “Search this Website…” text in the Search bar field in a Genesis WordPress theme by using a filter added to your functions.php file.
//Change search form text function themeprefix_search_button_text( $text ) { return ( 'Search text goes here...'); } add_filter( 'genesis_search_text', 'themeprefix_search_button_text' );
So in the above code a function is created, the text is passed in as an argument and run against the Genesis filter genesis_search_text .
8 comments
Caryn
Hi Neil,
The sizing and placement of my search box is off. I used the code above to move it to the top, but I need the box to be longer and moved up on the menu area just a smidge. Do you know where I do that spacing?
Thank you,
Caryn
Hani
hello sir
it’s good
how to make the text in center?
ty
Neil Gowran
You can use CSS and text align to do that
Johan
Is it possible to make the actual text bold or stand out more?
Neil Gowran
Sure is … – http://coolestguidesontheplanet.com/styling-placeholder-text-input-fields-forms-css/
Anna
Hi Neil!
I tried to fix it in my blog but I can’t find the code to modify in my functions.php
I’m using Genesis and Foodie Pro. Is there any way to fix it?
Thanks a lot!
Anna.
Jossie
You’re supposed to add it
Neil Gee
Hi Anna – you just add the code to your functions.php file