php – WordPress Taxonomy Term Override With Page-ThrowExceptions

Exception or error:

I’ve create a custom taxonomy for a site for contact types, showing contact details.

ie.

contact/sales
contact/hr

However, the sitemap also requires a special page within this structure, for example

contact/enquiry

If I create the page as normal, I get a 404, as clearly WP is looking for a matching taxonomy term. How do I perform a rewrite so that the contents of my page is displayed or it this realistically not possible? I can create a dummy term, and then a custom file, ie taxonomy-office_category-enquiry.php, but this seems very inelegant (as a user could inadvertently use this dummy term). What would by the best way of achieving this?

How to solve:

Leave a Reply

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