Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Created September 8, 2016 12:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/909e43e475a1fc7c0f55c65bb36983fe to your computer and use it in GitHub Desktop.
Save jchristopher/909e43e475a1fc7c0f55c65bb36983fe to your computer and use it in GitHub Desktop.
<form role="search" method="get" class="search-form" action="<?php echo home_url( '/' ); ?>">
<label>
<span class="screen-reader-text"><?php echo _x( 'Search for:', 'label' ) ?></span>
<input type="search" class="search-field"
placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder' ) ?>"
value="<?php echo get_search_query() ?>" name="s"
title="<?php echo esc_attr_x( 'Search for:', 'label' ) ?>" />
</label>
<input type="submit" class="search-submit"
value="<?php echo esc_attr_x( 'Search', 'submit button' ) ?>" />
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment