forked from mojaray2k/mayer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearchform.php
More file actions
18 lines (18 loc) · 736 Bytes
/
searchform.php
File metadata and controls
18 lines (18 loc) · 736 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
/**
* The custom search results template. Used to display the search form whenever
* `get_search_form()` is called.
*
* Note that the query is read using `get_search_query()` and then populates the value of
* the input when rendered.
*
* @package Mayer
* @since 1.0.0
*/
?>
<form role="search" method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>">
<div class="form-group">
<?php $search_query = strlen( get_search_query() ) == 0 ? '' : get_search_query(); ?>
<input placeholder="<?php esc_attr_e( 'Search...', 'mayer' ); ?>" type="text" value="<?php echo esc_attr( $search_query ); ?>" name="s" id="s" class="form-control" />
</div><!-- .form-group -->
</form><!-- #searchform -->