I want to remove “Search for” text from search form in TwentyTwelve, to wrap in in a div for styling, and probably to play with php a bit â and I’d appreciate some advice on how to do that best.
My “sub-questions within a question”:
1) Where is the main search function is located?
2) Should I create a separate custom file, add code to functions.php – or is it okay in this case to just edit the original search function?
Thank you in advance for your help!
Modify the
searchform.php
, or create one in a child theme (recommended), and you should be able to modify the form all you want.This is the file that
get_search_form
looks for and is the file used by the default search widget, though it is not listed in the Template Hierarchy.Reference:
http://codex.wordpress.org/Function_Reference/get_search_form