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.)

11 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. SEO Shqip says:

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

  5. Its so easy… Works like a charm. I did it totally wrong before and wasted more than an hour before i found the solution on this site. Thanks !

  6. that really helped me out. Thanks for sharing

  7. Jeffrey says:

    Images are one of the most important area’s to work with as the conversion always improves with the marketing part as the conversion towards the entire conversion improves

  8. Lee says:

    Nice tutorial, provided in details it worked for me thanks!

  9. john says:

    hey,thanx for this nice trick.i would try it in my blog.

  10. food dog says:

    Store pet supplyPet supply Dog Cat Small Animals Birds Fish Aquatic Pets Reptiles Amphibians

Leave a Reply