Support » Fixing WordPress » Archive displays all posts?!

  • I’m using pretty permalinks on my site – The ‘Day and name’ settings. The categories archive works fine, so are all the posts permalinks. But when I choose to view archive in its year and/or month, it displays all the posts that I have (like the blog itself), instead of only the selected year/month.

    Here’s .htaccess code I took from ftp

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    And this is the archive.php

    <?php get_header(); ?>
    <div class="title-wrapper"><div class="title-bg"></div><div class="title clearfix"><div id="drag_btn" href="#"></div><div id="slide_btn" href="#"></div>
       <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    	<?php /* If this is a category archive */ if (is_category()) { ?>
    	<h1>Archive for '<?php single_cat_title(); ?>'</h1>
    	<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
    	<h1>Posts Tagged '<?php single_tag_title(); ?>'</h1>
    	<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    	<h1>Archive for <?php the_time('F jS, Y'); ?></h1>
    	<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    	<h1>Archive for <?php the_time('F, Y'); ?></h1>
    	<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    	<h1>Archive for <?php the_time('Y'); ?></h1>
    	<?php /* If this is an author archive */ } elseif (is_author()) { ?>
    	<h1>Author Archive</h1>
    	<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    	<h1>Blog Archives</h1>
    	<?php } ?>
    <?php echo tag_description(); ?>
    <!-- end frame -->
    <div id="freespace-title"></div>
      <div class="content-wrapper clearfix"><div class="content clearfix">
        <ul id="sidebar-right">
          <?php teardrop_get_sidebar("blog_right")?>
        <div class="article">
          <?php teardrop_breadcrumb_nav()?>
          <?php get_template_part("inc/_list") ?>
      <div id="freespace"></div>
      <?php get_footer()?>

    Been trying to fix it, but to no avail.
    Would appreciate any advice on this! Thanks!!

    [ Please do not bump, that’s not permitted here. ]

  • The topic ‘Archive displays all posts?!’ is closed to new replies.