• Resolved megseoh

    (@megseoh)


    I have a news custom post type & on the archive news page (mysite.com/news/ = archive-news.php) I am using the custom post type widget to “display a list of archive links for each month that has custom posts”. It’s working brilliantly but when I click on any of the monthly archive links it leads to my 404 template. How do I set this up to display correctly? Which template do I modify? Is it archive.php? Here is the code that I have at the top of both my archive-news.php & archive.php:

    <?php if (is_month()) { ?>
    	<h2 class="archive-title h2">
    		<span><?php _e("Monthly Archives:", "customtheme"); ?></span> <?php the_time('F Y'); ?>
    	</h2>
    <?php } ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    Am currently working on a staging site so can’t share link unfortunately.

    https://www.ads-software.com/plugins/custom-post-type-widgets/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Display Monthly Archives 404 Error’ is closed to new replies.