In this case, I am using Espy Theme by WP Job Manager and instead of tampering with all the various templates it has, I decided to take the current Espy search form code from one of the templates, configure the coding so that it uses the [shortcode] capability and applied the code to functions.php and saved it to the Espy Child theme.
Now I can go to any page or post and add the following shortcode where I want to display the search form: [job_search_form] You can even add this to your favorite page builder like Elementor.
Here’s the code for the functions.php file. Enjoy!
/**
$regions = get_terms(array( 'taxonomy' => 'job_listing_region', 'hide_empty' => false, )); $job_region = get_option('job_manager_regions_filter'); ?> <div class="search-filter-wrap"> <form class="form-inline" method="GET" action="<?php echo job_manager_get_permalink('jobs'); ?>"> <div class="filter-inputwrap"> <div class="form-group"> <label class="sr-only" for="search_keywords"><?php _e('Job Titles, Keywords, Phrase', 'espy-jobs'); ?></label> <input type="text" name="search_keywords" class="form-control" id="search-keywords" placeholder="<?php esc_attr_e('Job Titles, Keywords, Phrase', 'espy-jobs'); ?>"> </div> <?php if ($job_region == '1') : ?> <?php if (!empty($regions) && !is_wp_error($regions)) : ?> <div class="form-group"> <label class="sr-only" for="search_region"><?php _e('Job Region', 'espy-jobs') ?></label> <select class="form-control" id="job-region" name="search_region"> <option><?php _e('All Regions', 'espy-jobs') ?></option> <?php foreach ($regions as $r) : echo '<option value="' . $r->term_id . '">' . $r->name . '</option>'; endforeach; ?> </select> </div> <?php endif; ?> <?php else : ?> <div class="form-group"> <label class="sr-only" for="search_location"><?php _e('All Location', 'espy-jobs') ?></label> <input type="text" name="search_location" class="form-control" id="search-location" placeholder="All Location"> </div> <?php endif; ?> <div class="form-group"> <button type="submit" class="btn btn-primary">Search</button> </div> </div> </form></div>
<?phpadd_shortcode(‘job_search_form’, ‘job_search_form_shortcode’);
]]>I wrote javascript that runs on document ready that finds the field and sets the value (tracing through the JS, I can see this happen). If the URL has been typed or pasted into the address bar, the field gets set and the search results appear just as expected.
Here’s where I’m running into issues:
Even if I navigate away from the page and then use one of the links to navigate back, it will reset to that same specialty. It was when I encountered this last bit of behavior that I began to wonder if perhaps a cookie was being set by the form, that then gets picked up on page load?
If anyone has some deeper understanding of what this mechanism is doing, it would be really helpful in building URL’s that can act as shortcuts to specific searches.
]]>I’m wanting to apply a custom link to all job search returns.
When someone clicks on the job, instead of the job linking to the job post, I’m wanting all job search returns to link to this URL: https://intelliapp.driverapponline.com/c/exclusivecdldrivers.
Any help is appreciated. Thank you.
]]>1. I currently have a Jobs page that has the [jobs] shortcode applyed to show a search bar and results below. However I also need to have an additional Job Search form on the homepage that directs to this same Jobs page to display the results. How can i do this?
2. Would the results of the homepage search bar be shown in the same [jobs] shortcode or would i need an additional results area to display those results?
3. Can i custom CSS the form to look how i want it to?
Please help
Many thanks
Graham
We have implemented Apply Online on a development website for a client. All is working fine, but my client would like to be able to implement free text job searching (in additional to Category / Type and Location filter search).
As the client’s website will also have other pages of content, he would like a simple search, enabling a single or multiple keywords to be entered, and ONLY results from available jobs would be displayed.
I have tried various other WP search plugins, but they also list any other pages or posts on the website, which the client does not want.
Is there any way of implementing free text search, that would ONLY search current jobs that are listed?
If there is no workaround for this, I would be interested in paying for this development, providing the price would be nominal….
Many thanks
Ciaran
]]>FOR EXAMPLE:
Go to www.erbi-bio.com and search for “engineer”.
TECHNICAL DETAILS:
This issue is also a thing on the pages I have the location shortcodes attached, with the exception of 1 location.
]]>