Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 32 lines (28 sloc) 1.066 kb
98a8e4e @jayj updated
authored
1 <?php
2 /**
3 * Search Form Template
4 *
5 * The search form template displays the search form.
6 *
7 * @package Cakifo
8 * @subpackage Template
9 */
10 ?>
11
12 <?php
13 // Set the value on the search input
14 if ( is_search() )
15 $value = 'value="' . esc_attr( get_search_query() ) . '"'; // Search query for the search page
16 elseif ( is_404() )
17 $value = 'value="' . esc_attr( basename($_SERVER['REQUEST_URI']) ) . '"'; // Requested URI for 404 page
18 else
19 $value= 'placeholder="' . esc_attr__( 'Search this site...', hybrid_get_textdomain() ) . '"'; // Or Search this site... as placeholder
20 ?>
21
22 <div class="search">
23
24 <form method="get" class="search-form" action="<?php echo trailingslashit( home_url() ); ?>">
a8f1bf3 @jayj Guess this is 1.2
authored
25 <label>
26 <span class="assistive-text"><?php _e( 'Search', hybrid_get_textdomain() ); ?></span>
27 <input class="search-text" type="search" name="s" <?php echo $value; ?> />
28 </label>
29 <input class="search-submit" type="submit" value="<?php esc_attr_e( 'Search', hybrid_get_textdomain() ); ?>" />
98a8e4e @jayj updated
authored
30 </form> <!-- .search-form -->
31
32 </div> <!-- .search -->
Something went wrong with that request. Please try again.