A
A
Alexander Navalny2019-07-22 10:39:06
Taxonomy
Alexander Navalny, 2019-07-22 10:39:06

How to force a template to be included in taxonomy pages?

Hello friend, I need your help! Let's figure it out together!
I have a custom taxonomy called => 'taxonomy_for_catalog' for a custom post type => 'type_catalog'
I have a catalog page that has the latest posts of the 'type_catalog' type mentioned above.
This is how this page .ru/catalog looks like:
5d3562663254f319760926.png
If you go to any of these posts, my template single-type_catalog.php works:
5d3562b5cfa61429031696.png
It would seem, what else is needed for happiness? After all, something is already working, and it is already worth a lot. Let's delve even one level lower:
The link for posts of the type_catalog type looks like this:
5d35677e5423a188159560.png
But if you go to any section from the menu of the .ru/catalog page, the link of which includes the name of the taxonomy itself:
5d3567c517e98027209695.png
5d35678866b8e313271512.png
It redirects me to index.php, which of course does not suit me, as well as my customer. There have been countless attempts to create template files for this taxonomy with different names, such as:
category-taxonomy_for_catalog.php
archive-taxonomy_for_catalog.php
page-taxonomy_for_catalog.php
taxonomy_for_catalog.php
in the admin panel by self-selecting a template for the newborn taxonomy_for_catalog page with the taxonomy_for_catalog label. Lacking originality from birth, the name of the selected template is the same as the page tag - taxonomy_for_catalog.
Please, kind people, tell me how to make the taxonomy template work? It feels like index.php is holding my templates hostage!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mr Crabbz, 2019-07-22
@Punkie

https://developer.wordpress.org/themes/basics/temp...
Screenshot-2019-01-23-00.20.04.png

L
Lord_Dantes, 2019-07-22
@Lord_Dantes

Update the "Permalinks" item, it might help. Make all your templates and update this item.

I
Igor Vorotnev, 2019-07-22
@HeadOnFire

Already asked on the Toaster a million times, and answered too. See my answer here - https://toster.ru/answer?answer_id=1346897

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question