forked from WebDevStudios/wd_s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
searchform.php
18 lines (16 loc) · 893 Bytes
/
searchform.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
/**
* The template for displaying the search form.
*
* @package _s
*/
// Make sure our search forms have unique IDs in the event more than 1 is on a page.
$random_identifier = wp_rand();
?>
<form method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label for="search-field-<?php echo esc_attr( $random_identifier ); ?>">
<span class="screen-reader-text"><?php esc_html_e( 'To search this site, enter a search term', '_s' ); ?></span>
<input class="search-field" id="search-field-<?php echo esc_attr( $random_identifier ); ?>" type="text" name="s" value="<?php echo get_search_query(); ?>" aria-required="false" autocomplete="off" placeholder="<?php echo esc_attr_e( 'Search', '_s' ); ?>" />
</label>
<input type="submit" id="search-submit" class="button button-search" tabindex="-1" value="<?php esc_attr_e( 'Submit', '_s' ); ?>" />
</form>