Displaying GIF buttons for "Previous Entries" and "Next Entries" (4 posts)

  1. venky_rs
    Posted 10 years ago #

    In my website, I want to display GIF buttons instead of just plain text links for "Previous Entries" and "Next Entries".

    These links are generated by "next_posts_link() & previous_posts_link()" tags in category.php

    Is there a way to display GIF buttons?

  2. Kafkaesqui

    Posted 10 years ago #

    <?php next_posts_link('<img src="/images/nextpost.gif" alt="Next Entries" />'); ?>

    Just make sure the path to the image(s) is correct. If the graphics reside in an images directory under your theme's, use this:

    <?php next_posts_link('<img src="' . get_bloginfo('template_url') . '/images/nextpost.gif" alt="Next Entries" />'); ?>

    May also want to add width and height attributes to the img tag.

  3. venky_rs
    Posted 10 years ago #

    That worked perfectly for me!!
    Thanks a lot Kafkaesqui

  4. red-star
    Posted 10 years ago #

    Why not shere the result :)

Topic Closed

This topic has been closed to new replies.

About this Topic