Support » Fixing WordPress » Replace text in main index navigation

  • Resolved pdxoutsider


    I want to edit the “Next Page” and “Previous Page” navigation links at the bottom of the main index (and any other page where they show up) to read “Older” and “Newer.” What lines do I have to edit of which stylesheets, located where? Is there a plugin that will allow me to edit this sort of thing from the dashboard?

    I’m not a coder or web designer, but I can follow instructions.

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


    Go to Manage, Theme Editior (this is from WP 2.5, but you get the idea). On the index.php (or Main Index Template) it should have the following lines of php:

    <?php next_posts_link(‘« Previous Entries’) ?>

    <?php previous_posts_link(‘Next Entries »’) ?>

    Edit the words “Previous Entries” and “Next Entries”, not the funky script before and after the words within the ( ). See if this works.



    No joy. My theme is Darkwater 1.1 by Anthony Baggett. The only mention of navigation in the index template is toward the bottom, where he calls

    <div class=”navigation”>
    <?php posts_nav_link(); ?>

    . . . which results in the same “Previous” and “Next” language that I see on every other WordPress blog I’ve visited. I can’t make this change in the theme, so I have to make it wherever the theme is pulling the navigation from. Any idea where that is?

    (Am I missing the point? Is Darkwater taking its lead from the default theme preloaded with WordPress, and I just have to change it there?)

    The blog is pdxoutsider if anybody needs to look at it.

    Edit: I just looked at the Default and Classic themes, and they already say “Older” and “Newer,” so that’s not it.



    By default, posts_nav_link uses “Previous Page” and “Next Page.” You just need to add parameters to change the defaults. Change <?php posts_nav_link(); ?> to <?php posts_nav_link(' &#183; ', 'Older', 'Newer'); ?> (&#183; is a middle dot, but you can use whatever separator you want).

    I downloaded the darkwater theme, and I noticed that posts_nav_link() appears in at least three files: archive.php, index.php, search.php.

    See the WordPress documentation on the posts_nav_link template tag for more details.



    That did it, after I switched the placement of “Newer” and “Older”. Thank you for the nav values and the documentation link. I learned something.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Replace text in main index navigation’ is closed to new replies.