-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathsearchform.php
21 lines (17 loc) · 1017 Bytes
/
searchform.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
/**
* The template for displaying search forms
*
* @package Scaffolding
*/
global $scaffolding_search_form_index;
if ( empty( $scaffolding_search_form_index ) ) {
$scaffolding_search_form_index = 0;
}
$scaffolding_index = $scaffolding_search_form_index++;
?>
<form method="get" class="sc-searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
<label class="screen-reader-text" for="sc-searchform-field-<?php echo isset( $scaffolding_index ) ? absint( $scaffolding_index ) : 0; ?>"><?php esc_html_e( 'Search for:', 'scaffolding' ); ?></label>
<input type="search" class="sc-searchform-field" name="s" id="sc-searchform-field-<?php echo isset( $scaffolding_index ) ? absint( $scaffolding_index ) : 0; ?>" value="<?php echo esc_attr( get_search_query() ); ?>" placeholder="<?php esc_attr_e( 'Search the Site…', 'scaffolding' ); ?>">
<button type="submit" value="<?php esc_attr_e( 'Search', 'scaffolding' ); ?>"><?php esc_attr_e( 'Go', 'scaffolding' ); ?></button>
</form>