Created
August 30, 2017 08:37
-
-
Save atcraigwatson/ba7c226536f70b50febe7ccc7b868120 to your computer and use it in GitHub Desktop.
A function to drop a quick job search section into the genesis layout
This file contains hidden or 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 | |
add_action( 'genesis_after_header', 'hiringsauce_add_quick_search_under_nav' ); | |
function hiringsauce_add_quick_search_under_nav() { | |
?> | |
<div id="homepage-quick-search"> | |
<form method="GET" action="https://hiringsauce.com/jobs"> | |
<span>Quick Search</span> | |
<div> | |
<label class="screen-reader-text" for="keywords">Job Title / Keywords</label> | |
<input type="text" id="search_keywords" name="search_keywords" placeholder="Job Title / Keywords"/> | |
</div> | |
<div> | |
<label class="screen-reader-text" for="search_category">County / Region</label> | |
<select id="search_category" name="search_category"> | |
<option>County / Region</option> | |
<?php foreach ( get_terms( 'job_listing_region' ) as $reg ) : ?> | |
<option value="<?php echo esc_attr( $reg->term_id ); ?>"><?php echo esc_html( $reg->name ); ?></option> | |
<?php endforeach; ?> | |
</select> | |
</div> | |
<div> | |
<input type="submit" value="Search" /> | |
</div> | |
</form> | |
</div> | |
<?php | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment