Adding custom search form with Bootstrap markup

This commit is contained in:
Holger Könemann 2016-03-03 20:38:28 +01:00
parent bb6e9614d8
commit 677e2e15e5
2 changed files with 16 additions and 4 deletions

View File

@ -1,9 +1,5 @@
<?php
/**
* The template part for displaying results in search pages.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
* @package understrap
*/
?>

16
searchform.php Normal file
View File

@ -0,0 +1,16 @@
<?php
/**
* The template for displaying search forms in Underscores.me
*
* @package understrap
*/
?>
<form method="get" id="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
<label for="s" class="assistive-text"><?php _e( 'Search', 'understrap' ); ?></label>
<div class="input-group">
<input type="text" class="field form-control" name="s" id="s" placeholder="<?php esc_attr_e( 'Search &hellip;', 'understrap' ); ?>" />
<span class="input-group-btn">
<input type="submit" class="submit btn btn-primary" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'understrap' ); ?>" />
</span>
</div>
</form>