Skip to content

Instantly share code, notes, and snippets.

@quangbahoa
Created September 11, 2012 02:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quangbahoa/3695453 to your computer and use it in GitHub Desktop.
Save quangbahoa/3695453 to your computer and use it in GitHub Desktop.
Replace get_search_form
// Search Form
function vn_wpsearch($form) {
$form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
<label class="screen-reader-text" for="s">' . __('Search for:') . '</label>
<input type="text" value="' . get_search_query() . '" name="s" id="s" placeholder="'.esc_attr__('Search the Site...').'" />
<input type="submit" id="searchsubmit" value="'. esc_attr__('Search') .'" />
</form>';
return $form;
}
add_filter( 'get_search_form', 'vn_wpsearch' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment