-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearchform.php
18 lines (16 loc) · 941 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 DebtCollective
*/
// 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', 'debtcollective' ); ?></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', 'debtcollective' ); ?>" />
</label>
<input type="submit" id="search-submit" class="button button-search" tabindex="-1" value="<?php esc_attr_e( 'Submit', 'debtcollective' ); ?>" />
</form>