Support » Fixing WordPress » Problem with Previous and Next Post

  • Hello,

    My blog is at

    When I view my blog articles, there are links at the bottom to direct you to the next post or the previous post. However, these links seem to be “bunched” too close together. I’ve seen on sites like Coldforged’s where those links are neatly spaced apart. What do you think is causing this? Could it be the size of my pics, or the length of the title, or the styling in the CSS file? Thanks for any help you can offer.


Viewing 7 replies - 1 through 7 (of 7 total)
  • You have them in a “centered” div.

    Okay Moshu,

    So I located the class “centre” in the stylesheet.

    .center {
    text-align: center;

    What can I change to make the links apear the way I want it to?

    I use this in my single.php template file:
    <div class="navigation">
    <div class="alignleft"><?php previous_post('&laquo; %','','yes') ?></div>
    <div class="alignright"><?php next_post(' % &raquo;','','yes') ?></div>

    .navigation {
    display: block;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 60px;
    margin-right: 30px;
    margin-left: 30px;

    .alignright {
    float: right;

    .alignleft {
    float: left

    Of course, the pixels values are fro my own design (Dark Maple).


    Here’s how this section in my index.php file currently looks. From what you have suggested, what do I need to change in the coding to make it work. I know about changing the div class ids but its more the PHP side of things where I get lost. Thanks.

    <div class=”center”>
    <?php posts_nav_link(‘  ‘, __(‘« Previous’), __(‘Next »’)); ?></div>

    It seems we are talking about two different tags 🙂
    If you have a single.php template, please paste your code here and post back with the URI. If you don’t, then paste the index.php.

    I posted my index.php file. I don’t have a single.php file.

    OK. Yes, I realized you don’t. That’s why you have to use the same template tag for 2 different tasks. (see: here in the Codex)
    At the above link you can also see several different ways of using it. (What I posted earlier was close to what is in Codex as “Kubrick format”).
    You could try copy-paste from the Codex and replace what you have now + add some modification in the stylesheet.

    Edit. On a second thought: if you have LONG post titles it wouldn’t help too much even if you put them in keft-right floated divs. They still will be close 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Problem with Previous and Next Post’ is closed to new replies.