-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsearchform.php
26 lines (22 loc) · 899 Bytes
/
searchform.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
/**
* Generic Search Form
*
* Displays the search form in all it's locations. The search widget, and
* anywhere `get_search_form()` is called.
*
* @link https://developer.wordpress.org/reference/functions/get_search_form/
*
* @package Granule
* @subpackage TemplatePart
* @author Ben Gillbanks <[email protected]>
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License
*/
?>
<form method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label>
<span class="screen-reader-text"><?php esc_html_e( 'Search', 'granule' ); ?></span>
<input type="search" value="<?php echo esc_attr( get_search_query() ); ?>" name="s" class="search-field text" />
</label>
<button class="search-submit"><?php granule_svg( 'search' ); ?><span class="screen-reader-text"><?php echo esc_html__( 'Search', 'granule' ); ?></span></button>
</form>