Skip to content

Instantly share code, notes, and snippets.

@benpearson
Created January 7, 2025 03:59
Show Gist options
  • Save benpearson/36ea22b9c08213685c4d21326279112a to your computer and use it in GitHub Desktop.
Save benpearson/36ea22b9c08213685c4d21326279112a to your computer and use it in GitHub Desktop.
Wordpress: Default WordPress search form HTML
<?php
/**
* Default WordPress search form HTML
*
* The same HTML will be generated if you delete this partial and use get_search_form()
*/
?>
<form role="search" method="get" id="searchform" class="searchform" action="<?php echo esc_url(home_url('/')); ?>">
<div>
<label class="screen-reader-text" for="s"><?php _x('Search for:', 'label'); ?></label>
<input type="text" value="<?php echo get_search_query(); ?>" name="s" id="s" />
<input type="submit" id="searchsubmit" value="<?php echo esc_attr_x('Search', 'submit button'); ?>" />
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment