Created
August 12, 2014 14:13
-
-
Save jchristopher/63a171417582e68d1276 to your computer and use it in GitHub Desktop.
Output a pre-search form that uses SearchWP Live Ajax Search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// output the pre-search form | |
function searchwp_pre_search_form_markup() { ?> | |
<div class="searchwp-pre-ticket"> | |
<h3>Create Support Ticket</h3> | |
<p>Begin by <strong>using a few keywords</strong> to describe your support issue:</p> | |
<div class="bbp-search-form" style="padding-bottom:0;"> | |
<form role="search" method="get" id="bbp-search-form" action="https://searchwp.com/support/"> | |
<div> | |
<label class="screen-reader-text hidden" for="bbp_search">Search for:</label> | |
<input tabindex="101" type="text" value="" name="bbp_search" id="bbp_search" data-swplive="true"> | |
<input tabindex="102" class="button" type="submit" id="bbp_search_submit" value="Search"> | |
</div> | |
</form> | |
</div> | |
<p><em>Good example:</em> <kbd>limit search results</kbd> <br /> | |
<em>Bad example:</em> <kbd>not working</kbd></p> | |
</div> | |
<?php } | |
add_action( 'bbp_template_after_single_forum', 'searchwp_pre_search_form_markup' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment