Skip to content

Instantly share code, notes, and snippets.

@jchristopher
Last active August 29, 2015 14:01
Show Gist options
  • Save jchristopher/226c751aab6993a04385 to your computer and use it in GitHub Desktop.
Save jchristopher/226c751aab6993a04385 to your computer and use it in GitHub Desktop.
Enable SearchWP Live Search on any search form input manually
<?php
// if your form is generated using get_search_form() you do not need to do this
// as SearchWP Live Search does it automatically out of the box
?>
<form action="" method="get">
<p>
<label for="s"><?php _e( 'Search' , 'mytextdomain' ); ?></label>
<input type="text" name="s" id="s" value="" data-swplive="true" /> <!-- 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