Kind, I have several rubrics, categories, the archive.php template displays everything in a crowd, I don’t like it very much, I have a training rubric that is output to a separate template, I placed the function <?php wp_get_archives( array('type' => 'yearly') ); ?> <?php wp_get_archives( array('type' => 'yearly') ); ?>
it displays links by year, when I click on these links, then I get to all the archives, but I would like to go to the archive of this category, they clicked and plunged the template with all the posts for the year from this category, like that. How to do not know. Perhaps there are some thoughts on this subject I will be very grateful.

    1 answer 1

    The archive.php template is used when no higher priority template is found. In your case, you can make a category-trainings.php template that will only select posts from the trainings category.

    WP Template Hierarchy

    • It was I who organized the output of posts from a certain category into the category-name.php template, but when I click on an archive, I go to the archive.php page where all the archives are in a crowd - Anton Essential
    • @AntonEssential what is written in the template? >> when clicking on the archive << when clicking where? Where is the link to the archive? - sirBlond