forked from felixarntz/wp-empty-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearchform.php
More file actions
17 lines (16 loc) · 793 Bytes
/
searchform.php
File metadata and controls
17 lines (16 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
/**
* The searchform.php template.
*
* @link https://developer.wordpress.org/reference/functions/wp_unique_id/
* @link https://developer.wordpress.org/reference/functions/get_search_form/
*/
$wp_empty_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( $wp_empty_theme_unique_id ); ?>">
<?php esc_html_e( 'Search', 'wp-empty-theme' ); ?>
</label>
<input type="search" id="<?php echo esc_attr( $wp_empty_theme_unique_id ); ?>" class="search-field" value="<?php echo get_search_query(); ?>" name="s" />
<input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button', 'wp-empty-theme' ); ?>" />
</form>