Category Archive

It’s a little bit hard to choose “best way”, when you give so few details describing your case. There are two most common ways I can think of. Use category description. You can then print it out in category/archive template using category_description. Make custom page template which will display posts from given category (or whatever … Read more

How can I change archive.php posts display?

It depends on how your archives.php is designed. You can use built-in wp_get_archives() function to get posts for last 12 months: <?php wp_get_archives( array( ‘type’ => ‘monthly’, ‘limit’ => 12 ) ); as described in the Codex. Or you can modify the WP_Query using ‘date_query’ parameter: <?php $args = array( ‘date_query’ => array( array( ‘after’ … Read more

Custom Post Type Archive.php

From Codex: taxonomy-{taxonomy}-{term}.php – If the taxonomy were sometax, and taxonomy’s slug were someterm WordPress would look for taxonomy-sometax-someterm.php. In the case of Post Formats, the taxonomy is ‘post_format’ and the terms are ‘post-format-{format}. i.e. taxonomy-post_format-post-format-link.php taxonomy-{taxonomy}.php – If the taxonomy were sometax, WordPress would look for taxonomy-sometax.php There is no custom post type custom … Read more