Title: previous_posts_link and index.php Problem
Last modified: August 19, 2016

---

# previous_posts_link and index.php Problem

 *  [pezpe](https://wordpress.org/support/users/pezpe/)
 * (@pezpe)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/previous_posts_link-and-indexphp-problem/)
 * First of all, I’m really sorry if there’s already a topic about this same problem.
   I just couldn’t find one.
 * **The problem:**
 * I’m having a frontpage which consists of two columns. First one shows three latest
   posts from a category called “yleinen” and the second one shows three latest 
   posts from “kritiikki”. Well everything works fine besides that previous_posts_link
   doesn’t work.
 * Url changes to /page/2/ but nothing happens to the actual posts.
 * Here’s my code from index.php
 *     ```
       <?php
       get_header(); ?>
   
       	<div id="content" role="main">
   
                   <div class="left">
       <?php query_posts('category_name=yleinen&posts_per_page=3'); ?>
       <?php if (have_posts()) : ?>
       		<?php while (have_posts()) : the_post(); ?>
       <div class="box-left">
       <div class="aika"><?php the_time('d.m.Y') ?></div>
       <div class="title"><?php the_title(); ?></div>
       <?php the_content('more »'); ?></div>
       <?php endwhile; ?>
       			</div>
   
                               <div class="right">
       <?php query_posts('category_name=kritiikki&posts_per_page=3'); ?>
       		<?php while (have_posts()) : the_post(); ?>
       <div class="box-right">
       <div class="aika"><?php the_time('d.m.Y') ?></div>
       <div class="title"><?php the_title(); ?></div>
       <div class="floatright"><?php the_post_thumbnail(); ?></div>
       <?php the_excerpt(); ?>
       </div>
   
       <?php endwhile; ?>
   
           <div class="navigation">
       			<?php next_posts_link(__('« Older Entries')) ?>
       			<?php previous_posts_link(__('Newer Entries »')) ?>
       		</div>
   
       <?php endif; ?>
       			</div>
   
       	</div>
   
       <?php get_footer(); ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  Thread Starter [pezpe](https://wordpress.org/support/users/pezpe/)
 * (@pezpe)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/previous_posts_link-and-indexphp-problem/#post-1706578)
 * sweet cheese… anyone?
 * i am in desperated need of help

Viewing 1 replies (of 1 total)

The topic ‘previous_posts_link and index.php Problem’ is closed to new replies.

## Tags

 * [navigation](https://wordpress.org/support/topic-tag/navigation/)
 * [previous_posts_link](https://wordpress.org/support/topic-tag/previous_posts_link/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [pezpe](https://wordpress.org/support/users/pezpe/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/previous_posts_link-and-indexphp-problem/#post-1706578)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
