Created
February 26, 2016 22:15
-
-
Save greghunt/4e4a2fa26a0d43bdd8a2 to your computer and use it in GitHub Desktop.
Wordpress HTML5 Bootstrap search form
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form role="search" method="get" class="search-form" action="<?php echo home_url( '/' ); ?>"> | |
<label for="searchField" class="screen-reader-text"><?php echo _x( 'Search for:', 'label' ) ?></label> | |
<div class="input-group"> | |
<input type="search" id="searchField" class="search-field" | |
placeholder="<?php echo esc_attr_x( 'Search the site for…', 'placeholder' ) ?>" | |
value="<?php echo get_search_query() ?>" name="s" | |
title="<?php echo esc_attr_x( 'Search for:', 'label' ) ?>" /> | |
<span class="input-group-btn"> | |
<button type="submit" class="btn btn-default"> | |
<?php echo esc_attr_x( 'Search', 'submit button' ) ?> | |
</button> | |
</span> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment