Support » Themes and Templates » link next post, i need change link title name

  • Resolved Alyson


    Hello everyone!

    In the post, it links at the top there are two
    1 for the next post
    1 for the previous post

    These links have the name with the name of the title of the next or previous post.

    I would like to change these names to:

    Next post
    Previous Post

    Could someone help me change it in code?


    in my theme single.php i have:

    $prev_link = get_previous_post_link(‘« %link’);
    $next_link = get_next_post_link(‘%link »’);

    <div class=”navigation”>
    <div class=”alignleft”><?php echo $prev_link; ?></div>
    <div class=”alignright”><?php echo $next_link; ?></div>

Viewing 7 replies - 1 through 7 (of 7 total)
  • Are you using the Twenty Ten theme or a different theme? Could you post a link to the site for us to take a look?

    I’m use mypooch theme
    wordpress 3.0.4

    All you need to do is change the content in between (‘ ‘) section in the first section:

    $prev_link = get_previous_post_link('Previous Post');
    $next_link = get_next_post_link('Next post');

    Let me know if that works.

    Hi Oturia!

    Thanks so much for your help 🙂

    With your code, i really change the link name.
    But i can’t click it.

    He changed the name of the link but lost the link to click.

    Oops. Change all of this:

    $prev_link = get_previous_post_link('« %link');
    $next_link = get_next_post_link('%link »');
    <div class="navigation">
    <div class="alignleft"><?php echo $prev_link; ?></div>
    <div class="alignright"><?php echo $next_link; ?></div>

    To just this:

    <div class="navigation">
    <div class="alignleft"><?php previous_post('&laquo; &laquo; %', 'Previous Post', 'no'); ?></div>
    <div class="alignright"><?php next_post('% &raquo; &raquo; ', 'Next Post', 'no'); ?></div>

    Working very well! Thanks so much friend!

    If you do something about this other problem

    I thank you again rs

    I did send a reply on the other post. Don’t forget to mark this post as resolved if this fixed your issue.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘link next post, i need change link title name’ is closed to new replies.