My method is a little unorthodox – there’s definitely a more elegant way than I achieved it, but here goes:
On the Job Manager plugins’ ‘Display Settings’ I added a ‘Job List Template’ with the following code:
[Code moderated as per the Forum Rules. Please use the pastebin]
This adds a class of the job categories in the plugin Admin Settings, to each of the cells that a jobs link is in, I then used jQuery to find non matching classes, then traverses to remove the parent row – acting as a filter to leave the matched category in the table.
The category reference was pulled from the ID I’d added to the header.php file:
<body <?php body_class(); ?> id="<?php echo $post->post_name; ?>">
and also by adding as a class in the jop post page body template by using jQuery to pull the category name from the table and then add it to the body, e.g.
$('table td.job-category a:contains("NEW JOBS")').parent('body').addClass('new-jobs');
$('table td.job-category a:contains("OLD JOBS")').parent('body').addClass('old-jobs');
So then if an pages body ID or class matches a category, the unmatched rows in the table are removed, leaving only the matching ones.
I also used the CSS to colour code content for branding.
Essentially my hack code lists all jobs, compares page ID or class for a match then removes non matching ones to leave jobs in category selected displayed.
Sorry I’m so bad at explaining it – it took me a while to figure out how to get it working myself, so I know this may not be clear immediately!
See:
https://www.bberecruitment.co.uk/vacancies/all
or by category:
https://www.bberecruitment.co.uk/vacancies/