How can I add a reset button to the filters from the listings archive?
If you want to give your visitors the option to reset all the filters applied to the listings archive, you need to follow these simple steps:
- Install the My Custom Functions plugin;
- Go to Dashboard → Settings → PHP Inserter;
- Press the ON button on the right corner of the text field;
- Paste this code:
add_action('job_manager_job_filters_search_jobs_end', function() { ?><button class="btn reset" onclick="FWP.reset()">Reset</button><?php });
- Hit the Save changes button.
Updated on August 25, 2020