Forums

Customizing the 'Read More' link (4 posts)

  1. doozy1117
    Member
    Posted 1 year ago #

    I am using WP Framework and am trying to use an image as the "read more" link.

    I have the code, but do not know where to place it.

    This is the code I have:
    <?php the_content('Read more...<img src="' . bloginfo('template_directory'). '/images/leaf.gif" alt="read more" title="Read more..." />'); ?>

  2. sanypoo
    Member
    Posted 1 year ago #

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <?php the_content('Read more...<img src="' . bloginfo('template_directory'). '/images/leaf.gif" alt="read more" title="Read more..." />'); ?>

    <?php endwhile; ?>

    <?php endif; ?>

  3. doozy1117
    Member
    Posted 1 year ago #

    Thanks for responding!

    does 'bloginfo' in this code = the name of the theme being used?

  4. Rev. Voodoo
    Volunteer Moderator
    Posted 1 year ago #

    not really....

    bloginfo('template_directory'). tells the code to look in the same directory as the template, which would be inside your themes folder

    then this part
    images/leaf.gif

    says to look in the images folder (within your theme), then to find an image called leaf.gif

Topic Closed

This topic has been closed to new replies.

About this Topic