Possibilities for the edit.php admin panel?

Here’s my scenario: I’m building a WordPress backend that links two custom post types for an HR department: Job Listings and Applicants.

Job Listing posts are created manually by the HR admin. Applicant posts are auto-generated based on form submission data.

I’ve set up a bunch of custom columns and filter options for the HR admin to use in the admin dashboard, but there are a couple items I’m stuck on – and maybe aren’t even possible to do with WordPress.

Without using a plug-in, can I sort posts out of the primary edit.php and into a submenu for that post type? For example, I want to hide archived Job Listings from the main display, but I want them to be available for duplication in the future. I’m setting the job’s posting status through an ACF radio button: open, closed, or archived.
Can I do the same thing for applicants, but base it off of the associated Job Listing’s archived status?

I also started to create a submenu for archived applicants, hoping to make it based off of the job’s status but it seems like I wouldn’t be able to get the full query quite right. Here’s what I have so far:

add_action(‘admin_menu’, ‘archivedapplicants_admin_menu’);
function archivedapplicants_admin_menu() {
add_submenu_page(‘edit.php?post_type=applicant’, ‘Archived Applicants’, ‘Archived Applicants’, ‘manage_options’, ‘edit.php?post_type=applicant&listing-status=archive’, NULL);

My CPT for the Job Listings is “joblisting”, the ACF field is titled “select”, the value should be “archive”, and each Applicant post has a custom field of “job_applied_id” that is the post ID of the Job Listing record.

Any help is greatly appreciated! I’ve been staring at this code for so long that it’s all stopped cooperating with me.

Read more here:: Possibilities for the edit.php admin panel?

Leave a Reply

Your email address will not be published. Required fields are marked *