Skip to main content
2 of 6
edited title
danjbh
  • 117
  • 4

Custom Taxonomy Theme file not routing correctly

I have tried contacting the developer of a plugin 'WP Broadbean' but the plugin basically creates a custom post type with various taxonomies.

One of which is 'Industries' - This is almost like a category for the jobs posted but I am going to assume it is a taxonomy rather than a category.

The Problem I am having is that the main template for /jobs to show all jobs regardless of taxonomy/category is a file named: archive-wpbb_job.php

A single view for a job is a file named: single-wpbb_job.php

When you apply a 'industry' to a job post the url then becomes /job-industry/taxonomy-title

The page by default falls back to archive.php if this is is blank/missing it routes to index.php but I require those pages for the native blog so I am struggling to create a custom template to handle the jobs when they are being viewd under a taxanomy/category.

For instance, one of my industries is called 'accounts' so I am wondering how I am able to create a template file, I have so many ways here are are a handful to name a few...

  • taxonomy-wpbb_job.php
  • taxonomy-wpbb_job_industry.php
  • archive-wpbb_job_industry.php
  • category-wpbb_job.php
  • category-wpbb_job_industry.php

I have tried to understand how the url should be structured by using both of these resources:

https://developer.wordpress.org/themes/template-files-section/taxonomy-templates/#category

and also...

https://wphierarchy.com/

So to conclude, I need to create a file to handle the template for these taxonomies so I can free up index.php and archive.php as I really don;t want to be relying on those.

I have been trying for a couple of hours now and just do not seem to be getting anywhere...

danjbh
  • 117
  • 4