I think the easiest way to do that is to edit the “template-archives.php” file. Specifically this section:
$args_loop = array( 'post_type' => 'post', 'posts_per_page' => 9999999 );
$loop_custom = new WP_Query( $args_loop );
if ( $loop_custom->have_posts() ) :
while ( $loop_custom->have_posts() ) : $loop_custom->the_post();
Can you show me how to edit this section so that it will only show posts for a specific year? Then I can just copy it and duplicate it for each year I want to recreate.
Thanks for the link, but I don’t like the look of the plugin. I’d rather keep the look of your Archives page, but just do a simple modification to the php file.
Can you show me what to change in that block of code (from “template-archives.php”) so I can bring in certain years? For example, if you show me how to modify this so only entries from 2016 show up, I can figure out how to do it for the other years:
$args_loop = array( 'post_type' => 'post', 'posts_per_page' => 9999999 );
$loop_custom = new WP_Query( $args_loop );
if ( $loop_custom->have_posts() ) :
while ( $loop_custom->have_posts() ) : $loop_custom->the_post();
Yes, I’ll be using a child theme. So I’d love to know how to modify that block of code to show only a certain year. Then I can figure out the rest myself, thank you!