Forums

[resolved] having trouble modifying "next" and "previous" post link text (3 posts)

  1. dinman
    Member
    Posted 2 years ago #

    hello WP folks,

    in a standard new installation of WP 2.7.2, i am trying to adjust the code on single.php (in the default theme) such that the text that shows up for the "next" and "previous" links read simply: "next" and "previous" instead of the default, which displays the titles of the next and previous posts as the link text. you'd think this would be an easy one but i can't seem to get it to work! is the another place in the css styles or theme files, where i need to edit this? or if it is in single.php, can someone please clue me in what the code should look like? i'd sure appreciate it!

    currently it looks like:

    <div class="navigation">
    <div class="alignleft"><?php previous_post_link('« %link') ?></div>
    <div class="alignright"><?php next_post_link('%link »') ?></div>
    </div>

    the doc here:
    http://codex.wordpress.org/Next_and_Previous_Links

    discusses adjustments to this, but nothing i've tried seems to achieve the simple hack i'm trying to achieve :P

    in short, i don't want the titles of the next and previous posts as link text, i just want the links to read "next" and previous"

    can anyone clue me in?

    thanks a lot,

    eric

  2. dinman
    Member
    Posted 2 years ago #

    oops, meant WP 2.7.1 =)

  3. dinman
    Member
    Posted 2 years ago #

    never mind! figured it out =)

Topic Closed

This topic has been closed to new replies.

About this Topic