WordPress.org

Forums

Previous || Next Navigation Not Working (6 posts)

  1. mliving
    Member
    Posted 9 years ago #

    Ok I've been pulling my hair our trying to get the Previous || Next to work correctly.

    I am trying to get the following code:

    <div class="navigation">
    <div class="alignleft"><?php posts_nav_link('','','« Previous Entries') ?></div>
    <div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div>
    </div>

    to display like this:
    << Previous || Next >>

    but all I get is the default,
    add the entire bloody post title to the link
    so it wraps across two lines
    and make it look rediculous!

    I didn't realize that my own template was based on Kubrick's theme. Beginners luck I guess.

    mliving

  2. Jinsan
    Member
    Posted 9 years ago #

    previous thread no good?

    http://wordpress.org/support/topic/35674

  3. mliving
    Member
    Posted 9 years ago #

    Ok I finally managed to get the linking working as posted in topic #35674 but is there a way I can have only the words:

    Previous (links to previous post)
    Next (links to next post)

    WITHOUT the post title being included in the link.

    BTW... I am making these revisions to the single.php file NOT the Main Template (index.php) as previous indicated. Making these changes to the index.php file had absolutely NO effect... only took me a frickin' hour to figure that out! (:-

    Any suggestions would be greatly appreciated.

    mliving

  4. Jinsan
    Member
    Posted 9 years ago #

    check the template tags for navigation in the codex, it tells you how to do that

  5. jennavery42
    Member
    Posted 9 years ago #

    Using the Kubrick/default files as a base, in my single.php file, I replaced this:

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

    With this:

    <div class="navigation">
    <div class="alignleft"><?php previous_post('%','« Previous', 'no'); ?></div>
    <div class="alignright"><?php next_post('%','Next »', 'no'); ?></div>
    </div>

    And it works great.
    See it here: http://www.highlysensitivesouls.com/blog/?p=55

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags