Support » Fixing WordPress » Navigation Issue

  • I’ve searched and maybe I’ve missed it but here is my issue if someone might be able to point me in the right direction.

    When going to an archived post the next post title and the previous post title link are shown at the top aligned to the left and right. Is it possible to create a link to the main page centered between the two? The code that is in use at this point is (I think):

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

    Any help would be appreciated…

    Thanks…

    e.s. – The Examined Life http://www.estephens.org

Viewing 4 replies - 1 through 4 (of 4 total)
  • You could use something like
    <a href="<?php bloginfo('url'); ?>">Home</a>
    probably in another div that’s centered?

    You could use this.
    Mine is at the top of my page, hence the post div showing here:

    <?php if ($single) { ?>
    <div class="cent">
    <?php previous_post('%', '', 'yes', 'no', 1, '') ?>
    > >
    ||
    <a href="http://www.example.com" title="Home">Home</a>
    ||
    < <
    <?php next_post('%', '', 'yes', 'no', 1, '') ?>
    <br />
    <br />
    </div>
    <?php } ?>

    <div class="post">

    This works in 1.5

    Note. If you have a single.php template you won’t need the if_single statement.

    Set it up like this in your template:

    <div class="navigation">
    <div class="alignleft"><?php posts_nav_link('','','&laquo; Previous Entries') ?></div>
    <div class="aligncenter"><a href="<?php bloginfo('home'); ?>">home</a></div>
    <div class="alignright"><?php posts_nav_link('','Next Entries &raquo;','') ?></div>
    </div>

    Then in your css:

    .alignright {
    width: 33%;
    float: left;
    text-align: left;
    padding-bottom: 10px;
    }
    .aligncenter {
    width: 34%;
    float: left;
    text-align: center;
    padding-bottom: 10px;
    }
    .alignleft {
    width: 33%;
    float: left;
    text-align: right;
    padding-bottom: 10px;
    }

    Your navigation class would probably need to have a width property of 100%.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Navigation Issue’ is closed to new replies.