-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsearchform.php
More file actions
24 lines (22 loc) · 956 Bytes
/
searchform.php
File metadata and controls
24 lines (22 loc) · 956 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
* Custom Search Form
*
* Search form with Submit text replaced with icon and submit input replaced with button.
* Same markup otherwise
*
* @link https://developer.wordpress.org/reference/functions/get_search_form/
*
* @package Sample_Theme
*/
?>
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ) ?>">
<label>
<span class="screen-reader-text"><?php echo esc_attr_x( 'Search for:', 'label', 'jmb-sample-theme' )?></span>
<input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', 'jmb-sample-theme' ) ?>" value="<?php echo get_search_query() ?>" name="s" />
</label>
<button type="submit" class="search-submit">
<i class="dashicons dashicons-search" aria-hidden="true"></i>
<span class="screen-reader-text"><?php echo esc_attr_x( 'Submit', 'submit button', 'jmb-sample-theme' ); ?></span>
</button>
</form>