Automattic / Automattic/WP-Job-Manager

Add filter for $jobs in WP_Job_Manager_Shortcodes->job_dashboard

Open
#2,146 0 comments 0 reactions 0 assignees View on GitHub
Enhancement
Dominant language
PHP
Stars
899
Forks
369
Avg merge
11h 37m
Merged PRs (30d)
12

Description

### Is your feature request related to a problem? Please describe
I need a complex set of rules to be applied when pulling in jobs on the job dashboard that cannot be solved with a single set of query arguments.

### Describe the solution you'd like
Add a filter to the `$jobs` variable returned by the `WP_Query` call in in `WP_Job_Manager_Shortcodes->job_dashboard`

### Describe alternatives you've considered
A cumbersome set of adding and removing filters on `the_posts` is possible if you hook into shortcode filters and wp_query filters.

### Additional context
Understandably, this would also effect pagination in the `job-dashboard.php` template, and would additionally be up to the filtered in action to handle this.

Contributor guide

Open the contributing guide

Research direction

Start at WP_Job_Manager_Shortcodes->job_dashboard and inspect the WP_Query call that produces $jobs, then read the job-dashboard.php template to understand how pagination uses the result. Done means the requested filter point is available for changing $jobs, with the pagination implications handled by the filtering action.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.