WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] link next post, i need change link title name (8 posts)

  1. Alyson
    Member
    Posted 3 years ago #

    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?

    edit:

    in my theme single.php i have:

    <?php
    $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>
    </div>

  2. oturia
    Member
    Posted 3 years ago #

    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?

  3. Alyson
    Member
    Posted 3 years ago #

    I'm use mypooch theme
    wordpress 3.0.4

  4. oturia
    Member
    Posted 3 years ago #

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

    <?php
    $prev_link = get_previous_post_link('Previous Post');
    $next_link = get_next_post_link('Next post');
    ?>

    Let me know if that works.

  5. Alyson
    Member
    Posted 3 years ago #

    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.

  6. oturia
    Member
    Posted 3 years ago #

    Oops. Change all of this:

    <?php
    $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>
    </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>
    </div>
  7. Alyson
    Member
    Posted 3 years ago #

    Working very well! Thanks so much friend!

    If you do something about this other problem http://wordpress.org/support/topic/change-recent-post-list-style?replies=1

    I thank you again rs

  8. oturia
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic