blog archive page styled from default template instead of from custom template
blog archive page styled from default template instead of from custom template
blog archive page styled from default template instead of from custom template
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 to set number of posts to display in archive
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
Override the else part of the index.php loop.
You can use has_post_format to check the if the post format equal to some format type. From the docs if ( has_post_format(‘gallery’) ) { // Do something } Or use $format = get_post_format() and then do some condition.. $format = get_post_format(); if ( $format == ‘gallery’ ) { // Do something } If you want … Read more
How To Get the Correct Character length of the Category Archives Page Title
This is not as straight forward as you would think and can give you some headaches. You will need to make use of rewrite rules to rewrite your desired URL. The real problem here is that property/map/ will be treated as a single post, which will 404 because a post with that name does not … Read more
how do I add a button in each category to display all posts?
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