Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Forked from anonymous/gist:1b9930ec89d5af2d5345d4b1e9243bc4
Last active August 16, 2017 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jchristopher/977626e5c073214bda6998892592e39c to your computer and use it in GitHub Desktop.
Save jchristopher/977626e5c073214bda6998892592e39c to your computer and use it in GitHub Desktop.
Code 2
<form action="" method="get">
<p>
<input type="text" name="swpquery" id="swpquery" value="" data-swplive="true" value="<?php if ( isset( $_GET['swpquery'] ) ) { echo esc_attr( $_GET['swpquery'] ); } ?>" /> <!-- data-swplive="true" enables SearchWP Live Search -->
</p>
<p>
<button type="submit"><?php _e( 'Search' , 'mytextdomain' ); ?></button>
</p>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment