WordPress.org

Ready to get started?Download WordPress

Forums

Archiving by page number (7 posts)

  1. JCataln
    Member
    Posted 5 years ago #

    Hey,

    I put up a similar topic under the plugins directory, but received no responses. I uninstalled the paginator, but the same problem persists. I have four pages worth of articles, but the theme/wordpress is not archiving pages three and four. That is to say, when I go to page three (now through the "previous entries" link) I get a 404 error.

    What could be the source of this error?

    Thank you!

  2. JCataln
    Member
    Posted 5 years ago #

    For example:

    Page Two: http://www.economicthought.net/page/2/

    Page Three: http://www.economicthought.net/page/3/

    Page 3 doesn't work.

  3. JCataln
    Member
    Posted 5 years ago #

    Any help would be awesome. By the way, I am using the Vina theme.

  4. whooami
    Member
    Posted 5 years ago #

    what happens when you use the default theme?

    what happens when you remove the pretty permalinks?

  5. JCataln
    Member
    Posted 5 years ago #

    I'll get back to you. I don't want to change links until activity through clicking links on other sites decreases (I get most of my traffic by me posting links to articles to other sites). It would make sense, since I believe problems started when I changed the permalinks, but it doesn't make sense that WordPress would include that but have a bug for archiving. Here is the theme's archive.php:

    <?php
    get_header();
    ?>
    
    <div id="content-wrap">
    <div id="content">
    <div class="gap">
    
    		<?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()) { ?>
    		<h2 class="pagetitle">Archive for the ‘<?php single_cat_title(); ?>’ Category</h2>
     	  <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
    		<h2 class="pagetitle">Posts Tagged ‘<?php single_tag_title(); ?>’</h2>
     	  <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h2>
     	  <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h2>
     	  <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    		<h2 class="pagetitle">Archive for <?php the_time('Y'); ?></h2>
    	  <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    		<h2 class="pagetitle">Author Archive</h2>
     	  <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    		<h2 class="pagetitle">Blog Archives</h2>
     	  <?php } ?>
    
    		<?php
    		 $counter = 0; $counter2 = 0;
    		while (have_posts()) : the_post();
    		 $counter++; $counter2++;
    		?>
    			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    <div class="<?php if ($counter == 1) { echo 'leftside'; } else { echo 'rightside'; $counter = 0; } ?>">
    <div class="atas-post"><?php the_time('F jS, Y') ?> - <?php the_time() ?> <!-- &sect; <?php _e('by'); ?> <?php the_author() ?>  -->&sect; in  <?php the_category(', ') ?></div>
    <div class="theimage">
    <a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>"><div class="pik" style="background: url(<?php the_post_image_url('thumbnail'); ?>) center center no-repeat; width: 150px; height:110px; border: 1px solid #777;">
    </div></a>
    </div>
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    
    				<div class="entry">
    					<p><?php
    						$texter = get_the_excerpt();
    						if(strlen($texter ) > 300) {
    						$texter = substr($texter , 0, 300);
    						}
    						echo ''.$texter.'[...]';
    						?>
    						</p>				</div>
    
    				<div class="postmetadata"><span class="lefter"><?php the_tags('Tags: ', ', ', ''); ?></span> <span class="righter"><?php edit_post_link('Edit', '', '  '); ?>  <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span></div>
    			</div>
    </div>
    		<?php endwhile; ?>
    
    		<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
          <div class="navigation">
            <div class="alignleft">
              <?php next_posts_link('&larr; Previous Entries') ?>
            </div>
            <div class="alignright">
              <?php previous_posts_link('Next Entries &rarr;') ?>
            </div>
          </div>
          <?php } ?>
    	<?php else :
    
    		if ( is_category() ) { // If this is a category archive
    			printf("<h2 class='center'>Sorry, but there aren't any posts in the %s category yet.</h2>", single_cat_title('',false));
    		} else if ( is_date() ) { // If this is a date archive
    			echo("<h2>Sorry, but there aren't any posts with this date.</h2>");
    		} else if ( is_author() ) { // If this is a category archive
    			$userdata = get_userdatabylogin(get_query_var('author_name'));
    			printf("<h2 class='center'>Sorry, but there aren't any posts by %s yet.</h2>", $userdata->display_name);
    		} else {
    			echo("<h2 class='center'>No posts found.</h2>");
    		}
    		get_search_form();
    
    	endif;
    ?>
    
    	</div>
    	</div>
    	</div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  6. JCataln
    Member
    Posted 5 years ago #

    There is also an archives.php:

    <?php
    /*
    Template Name: Archives
    */
    ?>
    <?php get_header(); ?>
    
    <div id="content-wrap">
    <div id="content">
    <div class="gap archives">
     <div class="xxpost">
       <h2 class="pagetitle">Journal Archive</h2>
    <p class="info">Welcome to Archive Page, I hope you will find what you are looking for.</p>
    
    <div class="pust"><?php wp_get_archives('type=postbypost&limit=20&format=custom&before=<div class="pist">&after=</div>'); ?></div>
    
    <?php if(function_exists('wp_tag_cloud')) { ?>
      <div class="categr">
      <h2>Archive by Tags:</h2>
    	<?php wp_tag_cloud(''); ?>
      </div>
    	<?php } ?>
    	<?php if(function_exists('category_cloud')) { ?>
      <div class="categr">
      <h2>Archive by Category:</h2>
      <?php category_cloud(); ?>
      </div>
    	<?php } ?>
      <div class="monthr">
      <h2>Archive by Month:</h2>
      <ul class="nones">
        <?php wp_get_archives('show_post_count=true') ?>
    	</ul>
    
    </div>
    </div>
    </div> <!-- /gap -->
    </div> <!-- /content -->
    </div> <!-- /content-wrap -->
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
  7. JCataln
    Member
    Posted 5 years ago #

    It's not the theme or the permalinks. This site archives fine: http://british-nationalist.org.uk/page/3/

Topic Closed

This topic has been closed to new replies.

About this Topic