Custom taxonomy, custom template

Hi, I would like to create a custom template for archives of all custom taxonomies. So as I read in several posts (e.g. https://theme.co/apex/forums/topic/custom-template-for-custom-taxonomy-archive/), I duplicated the following files in the child theme:
index.php => taxonomy.php (this is the template file as specified in WP template hierarchy) and updated its content to point to wp-taxonomy
Then I created wp-taxonomy and updated its content and so on…
Simply it does not work… and I only see two php warning.
In next reply I’ll write you credential and url for testing.

Hello,

This thread is too old, so, you could use the ACF extension to accomplish it. You can follow this article: https://theme.co/apex/forum/t/integrated-plugins-acf-pro/49

I know ACF very well, but I do not understand how it can help me with what I asked for. I need to have an ad hoc template file because I want to implement a custom design and not just add custom fields … I’m basing …

Hi there,

But this one works https://molisecoast.com/category/non-categorizzato/, that means the templates are correct. The taxonomy.php applies to any taxonomy including category. Would you mind providing more details about the taxonomy you wish to customize?

Please provide the admin URL where this taxonomy is. Maybe the issue is just triggered by it.

Thanks!

Taxonomies are “poicat” and “city” and post type is “poi” (see functions.php)
In admin CPT is “Punti di interesse” and taxonomies are “Città” and “Categorie”
Thanks.

Waiting…

Hi There,

I have renamed taxonomy.php just to check where the error is coming from. The moment I rename it the error is gone and as expected this page: https://molisecoast.com/cosa/ambiente/ display using the default template. Now I tried the more specific template: taxonomy-poicat.php. The same error occurs. This means this error is coming from other custom templates and this template is working. Some custom template is throwing this error. Please remove other custom templates you have added on framework folder of your child theme then check again. Add it one by one or start from the base. See the content of taxonomy-poicat.php. That’s the basic content - the header, the footer then add the content in the middle.

I have tried to follow your reasoning, but even with the simplified taxonomy-poicat.php file, I still see the error. I add that there are no other custom templates that can create the conflict. I’m confused. :disappointed_relieved:

Hi There,

Those template is supposed to work. I have tested it on my setup. Now there’s something on your site setup/customization that is throwing those errors. Looking for it, we have to start on your child theme contents. Just backup your child theme content and then remove all those other customize files. Then check if the errors still persists. If it’s gone, let’s add again those files one by one just to check which file throw those errors.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.