Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Output a pre-search form that uses SearchWP Live Ajax Search
// 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="">
<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">
<p><em>Good example:</em> <kbd>limit search results</kbd> <br />
<em>Bad example:</em> <kbd>not working</kbd></p>
<?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
You can’t perform that action at this time.