Job Filter Redirect
A WordPress plugin that creates custom, scrollable job filter dropdowns. It unifies all selected filters into a single search term (?s=) to ensure compatibility with themes that rely only on the default search query for dynamic archive titles and proper post filtering.
by Erick Ruo · github.com/erickruo72/wp-custom-search-filter
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/erickruo72/wp-custom-search-filter/archive/refs/heads/main.zipWP Custom Search Filter (Version 2.5)
This plugin provides a robust and aesthetically pleasing solution for advanced job filtering on WordPress sites where the theme's default title and query logic conflict with custom taxonomy parameters.
It achieves flawless title and search results by combining multiple filter selections (e.g., Company, Location, Qualification) into a single, comma-separated WordPress search term (?s=).
✨ Features
- Unified Search Submission: Uses JavaScript to intercept form submission, gather all selected taxonomy slugs, and consolidate them into the standard
$_GET['s']parameter. This guarantees that theme-dependent archive titles always display correctly. - Custom Scrollable Dropdowns: Replaces native
<select>elements with custom HTML (<div>/<ul>) to enable full CSS control. The dropdown lists have a fixed height (300px) and are vertically scrollable, providing a much better user experience for lists with many options. - Dynamic Title Generation: The included PHP filter (
job_filter_clean_title) automatically formats the combined slug list from the URL into a readable archive title (e.g., "Search Results for: Absa Bank Limited, Bachelor Of Science Jobs"). - Filter Reset: Includes a "Clear Filters" button and browser back-button logic to ensure the form resets properly.
⚙️ Installation
- Download: Download the
job-filter-redirect.phpfile. - Upload: Upload the file to your WordPress plugins directory (
wp-content/plugins/). - Activate: Go to the WordPress dashboard, navigate to Plugins, and activate "Job Filter Redirect."
🚀 Usage
The plugin uses a single shortcode to display the entire filtering form.
Shortcode:
[job_filter]
Place this shortcode anywhere you want the job filter form to appear (e.g., in a page, a widget, or directly in a theme template file using <?php echo do_shortcode('[job_filter]'); ?>).
🛠️ Configuration & Styling
1. Taxonomy Structure (Prerequisite)
The plugin is hardcoded to look for top-level categories with the following names. Ensure these parent categories exist in your WordPress installation:
- Company
- Qualification
- Location
- Experience
- Job Field
- Job Type
2. Adjusting Dropdown Height
If you need to change the fixed height of the scrollable dropdown list, you can edit the CSS within the PHP file:
- Open
job-filter-redirect.php. - Find the CSS class
.select-options-list. - Modify the
max-heightvalue (e.g., change300pxto200pxor400px).
.select-options-list {
/* ... other styles ... */
max-height: 300px; /* <-- EDIT THIS VALUE */
overflow-y: auto;
/* ... other styles ... */
}