Add searchform partial and function to replace (and maintain) default WordPress functionality

This commit is contained in:
MWDelaney
2018-08-05 12:07:32 -04:00
parent a9312c0633
commit 1ccc2eed76
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
<form role="search" method="get" class="search-form" action="{{ esc_url( home_url( '/' ) ) }}">
<label>
<span class="screen-reader-text">{{ _x( 'Search for:', 'label' ) }}</span>
<input type="search" class="search-field" placeholder="{!! esc_attr_x( 'Search &hellip;', 'placeholder' ) !!}" value="{{ get_search_query() }}" name="s" />
</label>
<input type="submit" class="search-submit" value="{{ esc_attr_x( 'Search', 'submit button' ) }}" />
</form>