• Resolved EMG

    (@emg)


    So all of my other Archive links work – categories, tags, author (got altered because I have my own custom Author page which I altered to show a listing of all of my posts) – but when I click on the Month and Year in my Archives widget, I get rerouted to my main site instead of to the archive.

    On my other site, I am running an altered version of the same theme, but the archives links link to the Month and Year Archives.

    What could be the culprit in this problem?

    It’s during times like this that I realize that I know so little about all the tags and loops and the like that WP uses.

    Here is my loop for my archives.php page:

    NOTE: This is NOT on the website linked to my username/icon.

    <?php if (have_posts()) : ?>
    
    		 <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    <?php /* If this is a category archive */ if (is_category()) { ?>
    		<h1 class="pagetitle">Archive for  <strong><?php echo single_cat_title(); ?></strong></h1>
    
     	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    		<h1 class="pagetitle">Archive for <strong><?php the_time('F jS, Y'); ?></strong></h1>
    
    	 <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    		<h1 class="pagetitle">Archive for <strong><?php the_time('F, Y'); ?></strong></h1>
    
    		<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    		<h1 class="pagetitle">Archive for <strong><?php the_time('Y'); ?></strong></h1>
    
    	  <?php /* If this is a search */ } elseif (is_search()) { ?>
    		<h1 class="pagetitle">Search Results</h1>
    
    	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    		<h1 class="pagetitle">Author Archive</h1>
    
      	  <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
    		<h1 class="pagetitle">Subject Matter Archive for ‘<?php single_tag_title(); ?>’</h1>
    
    		<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    		<h1 class="pagetitle">Blog Archives</h1>
    
    		<?php } ?>
    
    </div> <!-- end div for certain div block -->
    
    		<?php
    		while (have_posts()) : the_post();
    		$image = get_post_meta($post->ID, 'photo', true);
    		?>
Viewing 1 replies (of 1 total)
  • Thread Starter EMG

    (@emg)

    NEVERMIND!

    Fixed it!

    I completely forgot that I had the Robots plugin installed and at one point, was fiddling with the settings and told it to disable my date archives!

    Boy, now I REALLY feel silly!

Viewing 1 replies (of 1 total)
  • The topic ‘Links to Month and Year Archives Don’t Work’ is closed to new replies.