0

I have made a custom archive template for the custom post type (CPT) "eventbrite_events" which is use by the "Import Eventbrite Events" plugin.

The template is named "archive-eventbrite_events.php" using normal WordPress CPT naming conventions. Unfortunately it seams that the tags belonging to the custom taxonomy associated with the CPT picks the default archive template rather then the archive template associated with the CPT.

According to the WordPress template hierarchy there is no CPT template for tags. But if it can use the default archive there must be a way to make it use a custom archive template?

0

Have you checked out

https://wordpress.stackexchange.com/a/62263/19164

You need to register_taxonomy to let it use your custom post tags

  • There already exists a custom taxonomy associated with the CPT in question. My problems is that the tags associated with this custom taxonomy default to the archive.php template where as i want them to use a custom template archive_eventbrite_events.php. – Frederick M. Rogers Mar 15 '17 at 14:56
  • Can you post how you registered the taxonomy, also while i dig in for yah - check out this guy's issue sounds like he got stuck on archive.php too...wordpress.stackexchange.com/questions/51462/… – Nickey K Mar 15 '17 at 15:12
  • "Import Eventbrite Events" plugin. If you like i can dig into plugin to retrieve the portion of code regarding the taxonomy registration. Also i wondering if would not be easier to just make a custom template for this using WP_query() Any thoughts ? – Frederick M. Rogers Mar 16 '17 at 10:04
  • OK, i figured it out. My understanding of taxonomies was that each CPT had ONE taxonomy that INCLUDED categories and tags. I have now come to realize that categories and tags each have their own taxonomy. Looking at the template hierarchy this makes much more sense and i have solved my problem my making a template specifically for the tags taxonomy. Thank you Nickey for pointing me in the right direction! Wondering if i should edit my question to reflect my discovery or submit my ow answer. – Frederick M. Rogers Mar 16 '17 at 12:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.