Title: Adding Next/Previous Links
Last modified: August 19, 2016

---

# Adding Next/Previous Links

 *  [blong](https://wordpress.org/support/users/blong/)
 * (@blong)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/adding-nextprevious-links/)
 * I would like to add next and previous links at the top of my post that stay within
   a certain category. I am using the theme twenty ten. What is the best way to 
   do this? Thanks 🙂

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

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/adding-nextprevious-links/#post-1734017)
 * edit single.php – the link tags are there already:
 *     ```
       <div id="nav-above" class="navigation">
       					<div class="nav-previous"><?php previous_post_link( '%link', '<span class="meta-nav">' . _x( '&larr;', 'Previous post link', 'twentyten' ) . '</span> %title' ); ?></div>
       					<div class="nav-next"><?php next_post_link( '%link', '%title <span class="meta-nav">' . _x( '&rarr;', 'Next post link', 'twentyten' ) . '</span>' ); ?></div>
       				</div><!-- #nav-above -->
       ```
   
 * (and same thing further down: `<div id="nav-below" class="navigation">`)
 * then use the info from the docu:
 * [http://codex.wordpress.org/Function_Reference/next_post_link](http://codex.wordpress.org/Function_Reference/next_post_link)
   
   [http://codex.wordpress.org/Function_Reference/previous_post_link](http://codex.wordpress.org/Function_Reference/previous_post_link)
 * see the ‘in_same_cat’ parameter
 *  Thread Starter [blong](https://wordpress.org/support/users/blong/)
 * (@blong)
 * [15 years, 6 months ago](https://wordpress.org/support/topic/adding-nextprevious-links/#post-1734122)
 * Thank you so much! That document gave me exactly what I was looking for!

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

The topic ‘Adding Next/Previous Links’ is closed to new replies.

## Tags

 * [add](https://wordpress.org/support/topic-tag/add/)
 * [category](https://wordpress.org/support/topic-tag/category/)
 * [links](https://wordpress.org/support/topic-tag/links/)
 * [next](https://wordpress.org/support/topic-tag/next/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [previous](https://wordpress.org/support/topic-tag/previous/)
 * [top](https://wordpress.org/support/topic-tag/top/)
 * [twenty ten](https://wordpress.org/support/topic-tag/twenty-ten/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [blong](https://wordpress.org/support/users/blong/)
 * Last activity: [15 years, 6 months ago](https://wordpress.org/support/topic/adding-nextprevious-links/#post-1734122)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
