Created
November 27, 2014 21:38
-
-
Save fieldoffice/7dd2a360993f259611dd to your computer and use it in GitHub Desktop.
Replace the default search with an HTML5 version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function search_form( $form ) { | |
$form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" > | |
<label for="s">' . __('Search for:') . '</label> | |
<input type="search" placeholder="'.__("Enter keyword...").'" value="' . get_search_query() . '" name="s" id="s" /> | |
<input type="submit" id="searchsubmit" value="Search" /> | |
</form>'; | |
return $form; | |
} | |
add_filter( 'get_search_form', 'search_form' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment