-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearchform.php
More file actions
30 lines (29 loc) · 1.23 KB
/
Copy pathsearchform.php
File metadata and controls
30 lines (29 loc) · 1.23 KB
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
27
28
29
30
<?php
/**
* Search Form Template
*
* @package WM_Base_Theme
*/
$unique_id = wp_unique_id('search-form-');
?>
<form role="search" method="get" class="search-form" action="<?php echo esc_url(home_url('/')); ?>">
<label for="<?php echo esc_attr($unique_id); ?>" class="screen-reader-text">
<?php echo esc_html_x('Search for:', 'label', 'wm-base-theme'); ?>
</label>
<input
type="search"
id="<?php echo esc_attr($unique_id); ?>"
class="search-form__input"
name="s"
value="<?php echo esc_attr(get_search_query()); ?>"
placeholder="<?php echo esc_attr_x('Search…', 'placeholder', 'wm-base-theme'); ?>"
aria-label="<?php echo esc_attr_x('Search for:', 'aria-label', 'wm-base-theme'); ?>"
/>
<button type="submit" class="search-form__submit">
<span class="screen-reader-text"><?php echo esc_html_x('Search', 'submit button', 'wm-base-theme'); ?></span>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">
<circle cx="11" cy="11" r="8"></circle>
<line x1="21" y1="21" x2="16.65" y2="16.65"></line>
</svg>
</button>
</form>