How to replace Read More with an image

Sometimes it’s preferable to have a button instead of text to allow the reader to jump to the rest of a post. Following is the code to replace the text with an image:

 <?php the_content('<img src=
"' . get_bloginfo('template_directory'). '/images/readmore.png"
alt="read more" title="Read more..." />'); ?>

Obviously, replace /images/readmore.png with your image director and file name.

(This is slightly different from the instructions in the WordPress Codex, which did not work for me.)

5 Responses to “How to replace Read More with an image”

  1. Hi Randa,

    I have been using “Read more” text in my web site for linking pages. Thx for coding to replace text with an image to linking. I will try on my site.

  2. allinfo says:

    sorry to ask..

    but where can i find the code to replace the “read more” text?

    thx

  3. Randa says:

    In any of your theme files where the loop is and calls for the content. Try index.php, home.php, category.php, archive.php for starters.

  4. I have tried this in one of my website. I think this is very best idea…

  5. SEO Shqip says:

    Nice! should be better with an image.
    Thanks so Much.

Leave a Reply