-
Notifications
You must be signed in to change notification settings - Fork 0
/
searchform.php
24 lines (20 loc) · 989 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
<?php
/**
* Digital Nomad Theme
*
* This file adds custom search form to the Digital Nomad theme.
*
* @package Digital Nomad Theme
* @author thebrandiD
* @license GPL-2.0+
* @link https://thebrandidthemes.com/
*/
$unique_id = esc_attr( uniqid( 'search-form-' ) );
?>
<form role="search" method="get" class="search-form" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<label for="<?php echo $unique_id; ?>">
<span class="screen-reader-text"><?php echo _x( 'Search for:', 'label', 'digital-nomad' ); ?></span>
</label>
<input type="search" id="<?php echo $unique_id; ?>" class="search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder', 'digital-nomad' ); ?>" value="<?php echo get_search_query(); ?>" name="s" />
<button type="submit" class="search-submit"><?php echo digital_nomad_get_svg( array( 'icon' => 'search' ) ); ?><span class="screen-reader-text"><?php echo _x( 'Search', 'submit button', 'digital-nomad' ); ?></span></button>
</form>