Created
January 7, 2025 03:59
-
-
Save benpearson/36ea22b9c08213685c4d21326279112a to your computer and use it in GitHub Desktop.
Wordpress: Default WordPress search form HTML
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
<?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