Title: Replace &#039;Next / Previous&#039;
Last modified: August 20, 2016

---

# Replace 'Next / Previous'

 *  Resolved [senthilmaster](https://wordpress.org/support/users/senthilmaster/)
 * (@senthilmaster)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/replace-next-previous/)
 * Hello Eric,
 * I posted this question in the “Remove Next & Previous” post, but as it is “Resolved”
   I’m not sure it was the proper way…
 * So I’m not trying to remove “Next” and “Previous” but I would like to change 
   the text by the TwentyTen’s navigation for the posts pages : `<?php next_posts_link(
   __( '<span class="meta-nav">&larr;</span> Older posts', 'twentyten' ) ); ?>` (
   and `Newer posts &rarr;`).
 * I tried copying the TwentyTen’s loop.php navigation lines at the end of posts_loop_template.
   php but it didn’t work…
 * Is there a way to do it ?
 * [http://wordpress.org/extend/plugins/posts-in-page/](http://wordpress.org/extend/plugins/posts-in-page/)

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

 *  Plugin Author [ivycat](https://wordpress.org/support/users/ivycat/)
 * (@ivycat)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/replace-next-previous/#post-3358414)
 * Hello senthilmaster,
 * Right now there isn’t an easy way to change this using the loop template (if 
   it added it, it would show up under each post)
 * There is a filter, so you could do drop the following code into your functions.
   php file:
 *     ```
       function posts_in_page_replace_prev_next( $links ){
           $links = str_replace( 'Next', 'Older Posts &larr', $links );
           $links = str_replace( 'Previous', 'Newer Posts &rarr;', $links );
           return $links;
       }
       add_filter( 'posts_in_page_paginate', 'posts_in_page_replace_prev_next' );
       ```
   
 *  Thread Starter [senthilmaster](https://wordpress.org/support/users/senthilmaster/)
 * (@senthilmaster)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/replace-next-previous/#post-3358415)
 * That’s perfectly working, thank you so much for your help!
 * Just a small correction for anybody wishing to do the same, it must be `'&larr;
   Older Posts'` for the arrow to be displayed (the ; was missing), and to be placed
   before the text 😉
 * Just another question, is there a way to apply an id or a class to each, so that
   I can style them (for instance float:left and float:right) in my CSS stylesheet?
 *  Plugin Author [ivycat](https://wordpress.org/support/users/ivycat/)
 * (@ivycat)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/replace-next-previous/#post-3358420)
 * There isn’t currently a class on each individual link (for prev/next).
 * The easiest way is to target the parent element div class=”pip-nav” and use first-
   child or last-child styles to float the elements left or right as needed.
 *  Thread Starter [senthilmaster](https://wordpress.org/support/users/senthilmaster/)
 * (@senthilmaster)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/replace-next-previous/#post-3358428)
 * Thank you ivycat, I didn’t know about the first-child/last-child!
 * So for anybody whishing to achieve the same, here are the 2 lines I added in 
   my Twenty-Ten child-theme’s stylesheet:
 *     ```
       #content .pip-nav li:first-child {
       	float: right;
       }
       #content .pip-nav li:last-child {
       	float: left;
       }
       ```
   

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

The topic ‘Replace 'Next / Previous'’ is closed to new replies.

 * ![](https://ps.w.org/posts-in-page/assets/icon-256x256.png?rev=1596190)
 * [Posts in Page](https://wordpress.org/plugins/posts-in-page/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-in-page/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-in-page/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-in-page/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-in-page/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-in-page/reviews/)

## Tags

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

 * 4 replies
 * 2 participants
 * Last reply from: [senthilmaster](https://wordpress.org/support/users/senthilmaster/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/replace-next-previous/#post-3358428)
 * Status: resolved