Most WordPress themes come with their own HTML markup for it’s search form. But sometimes you just don’t know where the hell the code is coming from.
Let’s say you drag the Search widget to your Dynamic Sidebar but want to change the text of the search button. Well here’s what you gotta do:
- Look for a file in your theme directory called searchform.php
- If you find it, edit it.
- If you don’t find it, create a file called searchform.php in your theme directory and paste the following default code:
<form id="searchform" method="get" action="/index.php"> <div> <input type="text" name="s" id="s" size="15" /><br /> <input type="submit" value="Search" /> </div> </form>
Now you’re ready to edit your default Search Form.
