[resolved] Replace text in main index navigation (5 posts)

  1. pdxoutsider
    Posted 8 years ago #

    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.

  2. mibsolutionsllc
    Posted 8 years ago #

    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.

  3. pdxoutsider
    Posted 8 years ago #

    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.

  4. designsimply
    Posted 8 years ago #

    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.

  5. pdxoutsider
    Posted 8 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic