• Hi everyone,

    I’ve got a similar issue as the one related here. I’m trying to use an image as my next/previous links as well, but in the navigation between the index pages, like the home , categories and archive results.

    I was using:

    <?php next_posts_link('<img src="myImg.png" />') ?>
    <?php previous_posts_link('<img src="myImg.png" />') ?>

    But I need to pass a class and a title to the <a>, so I tried this:

    <a class="myClass" href="<?php next_posts(); ?>" title="myTitle"><img src="myImg.png" /></a>
    <a class="myClass" href="<?php previous_posts(); ?>" title="myTitle"><img src="myImg.png" /></a>

    However, the link shows all the time, even when there’s no previous or next page.

    I’m quite sure it’s not very difficult to solve, maybe a little bit of code, but I’m no php dev.

    could somebody help me, please?

    thanks,
    Cátia

  • The topic ‘Custom previous and next posts’ is closed to new replies.