WordPress pagination seems to be ignored

My ‘older entries’ link is not working. Can someone help to check it? Because I can’t find it.

My website is http://prestasijunior.org/news/. That’s where the link is not working.

Read More

Here’s the code:

<?php
    //query posts
        query_posts(
            array(
            'post_type'=> 'post',
            'paged'=>$paged
        ));
    ?>

<?php query_posts("showposts=1")?>

    <?php if (have_posts()) : ?>
            <?php get_template_part( 'loop', 'entry') ?>
    <?php endif; ?>       

</div>

<?php get_sidebar(); ?>

<?php
// Show a selected number of posts per row
$posts_per_row = 2;
$posts_per_page = 8;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array(
   'posts_per_page' => $posts_per_page,
   'paged' => $paged,
);
query_posts($args);
query_posts('offset=1');
if (have_posts()) {
   while (have_posts()) {
      the_post();
      if ((++$post_counter % $posts_per_row) == 1  || $posts_per_row == 1) {
         if ($post_counter > 1) {
            echo "</div><!-- End of post_row -->n";  // End previous row
         }
         echo "<div class='post_row'>n";  // Start a new row
      }
      echo "<div class='post_class'>n";  // Start one post
      // Output post data here
      echo "<div class='loop-entry-jmy'>n";
      echo "<div class='loop-entry-date-j'>n";the_time('j');echo "</div>n";
      echo "<div class='loop-entry-date-m'>n";the_time('M');echo "</div>n";
      echo "<div class='loop-entry-date-y'>n";the_time('Y');echo "</div>n";
      echo "</div>n";
      echo "<a href='". get_permalink() ."' id='news-title-2'>";the_title();echo "</a>";
      echo "<div class='p-excerpt'>n";the_excerpt();echo "</div>n";
      echo "</div><!-- End of post_class -->n";  // End of post
   } ?>

   </div><!-- End of post_row -->
   <div class='clear'></div>
   <div class="navigation">
    <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div>
   </div>
<?php } else {
   // Code for no posts found
}
?>

Thank you very much for your help.

Related posts

Leave a Reply