Title: next/previous post
Last modified: August 18, 2016

---

# next/previous post

 *  Resolved [mindfeck](https://wordpress.org/support/users/mindfeck/)
 * (@mindfeck)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/)
 * I would like to have a next/previous post link on my main page and on each of
   my posts to get the next or previous post chronologically. Right now, on the 
   main page there are links to go to an archive of the previous or next day.
 * Also, when navigating to an archive day, month, or year, it lists the titles 
   but not the content. How can I make the content appear too?
 * [http://www.mindfeck.info](http://www.mindfeck.info)
 * All help is greatly appreciated.

Viewing 11 replies - 1 through 11 (of 11 total)

 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/#post-414191)
 * 1. On main page (aka index) where normally more posts are listed/displayed – 
   the next/prev link is just a “pagination” to not show zillion posts on a long-
   long page.
    2. Since you have set to show 1 (one) post on your index – the prev/
   next will show the same amount of posts = 1. 3. The “Archive” title comes with
   your theme; never seen before 4. Links to the previous and next _post_ are displayed(
   normnally) on the single post view.
 * 5. Switch to another theme (just for testing) and set the # of posts to something
   higher than 1 – and you’ll see that everything you are asking for is working 
   in an out-of-the-box WP install.
 * EDIT. And never double post – I am very inclined to delete duplicate posts…
 *  Thread Starter [mindfeck](https://wordpress.org/support/users/mindfeck/)
 * (@mindfeck)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/#post-414194)
 * I realized on the first post that I left out some info and I didn’t know how 
   to edit it, sorry.
 * I found in theloop.php how to make the archive pages show the content. My only
   question remains in how to get a previous post link on the single posts. I don’t
   see any links there.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/#post-414196)
 * Check out the Default theme’s single.php file to see how it is done.
 *  Thread Starter [mindfeck](https://wordpress.org/support/users/mindfeck/)
 * (@mindfeck)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/#post-414197)
 * I know how it’s done, I just don’t know where to post the code.
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/#post-414204)
 * Obviously in the single.php template file … where you want the links to appear.
   THat’s why I suggested to take a look at it in other themes.
 *  Thread Starter [mindfeck](https://wordpress.org/support/users/mindfeck/)
 * (@mindfeck)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/#post-414223)
 * I put it in what seems to be the right place, but the text is not a link. It 
   is only a link if I put it before …?php include (TEMPLATEPATH . ‘/theloop.php’);?
   >
    but that messes up the layout.
 *  Thread Starter [mindfeck](https://wordpress.org/support/users/mindfeck/)
 * (@mindfeck)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/#post-414224)
 * Okay I changed it from “div class=alignleft” to “div align=left” and that made
   the links work, but now the previous/next links are on different lines. What 
   should I do?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/#post-414231)
 * Two divs will never be on the same line… unless you do a little work around them.
   
   Since in the Deafult this problem is solved (you just have to look at it, as 
   I suggested above), I don’t understand why don’t you follow the advice: Study
   how it is done in other themes and apply the solution to your theme.
 *  Thread Starter [mindfeck](https://wordpress.org/support/users/mindfeck/)
 * (@mindfeck)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/#post-414234)
 * Well because it didn’t work as it did in the default, I had to change the div
   code, and now it doesn’t look right.
 *  Thread Starter [mindfeck](https://wordpress.org/support/users/mindfeck/)
 * (@mindfeck)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/#post-414237)
 * And I want to have the previous/next post links on the front page too, not just
   the single post. How do I do that?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/#post-414256)
 * _because it didn’t work as it did in the default_
    That’s probably because you
   have to look at the style.css file, too – to achieve the same effect 😉
 * _And I want to have the previous/next post links on the front page too_
    Out 
   of the box that doesn’t work. The Wp engine recognizes whether it’s an index 
   or a single post view and doesn’t let you use single-specific code on index. 
   See this Codex page: [http://codex.wordpress.org/User:alphaoide/wp_powered_photoblog](http://codex.wordpress.org/User:alphaoide/wp_powered_photoblog)
   to get ideas how to “trick” WP to think your index is a single…

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘next/previous post’ is closed to new replies.

## Tags

 * [next](https://wordpress.org/support/topic-tag/next/)
 * [previous](https://wordpress.org/support/topic-tag/previous/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 11 replies
 * 2 participants
 * Last reply from: [moshu](https://wordpress.org/support/users/moshu/)
 * Last activity: [19 years, 11 months ago](https://wordpress.org/support/topic/nextprevious-post-1/#post-414256)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
