Last active
April 21, 2022 01:36
-
-
Save mikejolley/13061e3b1fc6fbb194ef to your computer and use it in GitHub Desktop.
WP Job Manager - Custom search form
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
<form method="GET" action="YOUR_JOBS_PAGE_URL"> | |
<p> | |
<label for="keywords">Keywords</label> | |
<input type="text" id="search_keywords" name="search_keywords" /> | |
</p> | |
<p> | |
<label for="keywords">Location</label> | |
<input type="text" id="search_location" name="search_location" /> | |
</p> | |
<p> | |
<label for="search_category">Category</label> | |
<select id="search_category" name="search_category"> | |
<?php foreach ( get_job_listing_categories() as $cat ) : ?> | |
<option value="<?php echo esc_attr( $cat->term_id ); ?>"><?php echo esc_html( $cat->name ); ?></option> | |
<?php endforeach; ?> | |
</select> | |
</p> | |
<p> | |
<input type="submit" value="Search" /> | |
</p> | |
</form> |
Is there a way to hide the listings by default, only show a search form? The shortcode [jobs] outputs a form, and below it, the most recent listings. I just need the search form :/
disculpe, como se colocaria la pagina a la que se esta redirigiendo para que muestre los resultados?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Amazing, thanks so much for this. You made my day.