WordPress.org

Ready to get started?Download WordPress

Forums

previous post-main page navigation plugin (8 posts)

  1. richards1052
    Member
    Posted 7 years ago #

    I see on some Typepad blogs a navigation feature appearing above posts w. links allowing the reader to go to the next post, previous post or main pg. Can anyone tell me whether there is such a WP plugin.

    I figure any feature that makes it easier for readers to navigate through posts may encourage them to stay longer at the blog. What do others think?

  2. Lester Chan
    Member
    Posted 7 years ago #

    navigate through post as in next/prev post or pagination for post?

  3. richards1052
    Member
    Posted 7 years ago #

    I think what I'm looking for is navigate through post. In other words, you're reading a specific individual post. At the top of the post would be a link for main/previous/next posts.

  4. MarkMichon
    Member
    Posted 7 years ago #

    I think you are looking for are these template tags.

    <?php previous_post_link('&laquo; %link') ?>
    <?php next_post_link('%link &raquo;') ?>

    They do what they sound like. They put a link with the name of the next post. If you would rather it not say the title, change %link to Next or whatever.

  5. richards1052
    Member
    Posted 7 years ago #

    Thanks MarkMichon. If I also wanted to include a link back to the main pg. as a 3rd option, how would that look code-wise?

  6. Jeremy Clark
    Moderator
    Posted 7 years ago #

    <a href="<?php bloginfo('url'); ?>">Home</a>

  7. showmii
    Member
    Posted 7 years ago #

    I'm attempting to add these tags to my site, specifically on single.php.

    There seems to be some stylesheet element(?) preventing them from sitting properly.

    I'm using this code:

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

    Any suggestions? Much appreciated,

    CHris

  8. Jeremy Clark
    Moderator
    Posted 7 years ago #

    Look in your style sheet for the classes navigation, alignright, and alignleft. If those aren't in your styles then you'll have to add them and style appropriate.

Topic Closed

This topic has been closed to new replies.

About this Topic