• Hello,

    This code is working fine for me in terms of rollovers:

    <div id="sidebar_navbuttons">
       <div class="previmg"><?php if(get_previous_posts_link()) { previous_posts_link('Newer Entries ?'); } else { echo 'No Newer Entries'; } ; ?></div>
       <div class="nextimg"><?php if(get_next_posts_link()) { next_posts_link('? Older Entries'); } else { echo 'No Older Entries'; } ; ?></div>
    </div>

    So I have the CSS working.
    However, the images don’t actually link to the previous post or the next post. Even when I take the images away and just have text, it doesn’t work.

    Any idea on why the above isn’t linking to the previous post and next post? Do I have to modify the code in some way?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • are they linking at all?
    if so, where to?
    do the checks on the last and first page work?

    where is the code in realtion to the main loop?

    is there possibly some custom query inbetween?
    if so, try to add wp_reset_query(); before your snippet.

    link to your site to illustrate the issue?

    Thread Starter machination

    (@machination)

    No, the link does not work at all.

    I’m only using this for specific project-related posts.

    The code is within a custom widget.

    Don’t think I can link to the site yet. I’m going to try the image rollover plugin to see if that works instead, and that way I can keep it in this format:

    <?php previous_post_link('%link', '<img src="../img/prev.png" alt="Previous" />

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Next and Previous post – image rollovers’ is closed to new replies.