Creating a custom taxonomy.php
-
I created a custom post type, along with several custom taxonomies;
I then managed to create a custom template for the CPT through a function on a child theme’s functions.php, and injected it using an action hookadd_action('astra_entry_content_before', 'custom_template_function');
Now I would like to do the same for the custom taxonomies, for which I ask for the community’s enlightenment.
I suppose the best way to customize the appearance of the archives, in this particular case, would be to create a taxonomy.php, which would apply to all custom taxonomies and respective terms, right?
In order to create the taxonomy.php file, I guess I should use a copy of archive.php, but I have no idea where to inject my code in there. Or would it be more adequate to change some existing function?
I appreciate any help or resources that may be provided.
- The topic ‘Creating a custom taxonomy.php’ is closed to new replies.