Customize the “read more” link in WordPress

WordPress read more customizationWhen your readers are looking at the front page of your WordPress powered site,  they typically reads the first part of your posts, and then clicks on a “read more” link to read the rest of the post.

However if this “read more” link isn’t visible enough, or too few readers are clicking on the link, then it might be relevant to change the link.

Changing the text

The easiest part is to change the text in the more link. The standard text looks like this:

Standard More text in WordPress

If you like to customize the text, open the index.php file in your active theme, and look for the following line:

<?php the_content('more...'); ?>

To change the text, just replace the (‘more…’) with whatever text you like. Eg.:

<?php the_content('click here to read the rest of this great post...'); ?>

As always it’s a good idea to test a little. So my suggestion is that you experiment with different texts, and tries to see what works best.

Changing the appearance

Depending on how your WordPress theme looks like, it might be a good idea to style the link, to ensure prominence on the page.

You can style the link in the same place as you change the text, with regular CSS.

In this example we’ll create a button with border and background color.

In index.php you need to ass a CSS class (moretext)to the link.:

<?php the_content('<span class="moretext">read more...</span>'); ?>

Then you need to create some CSS. In this example it’s just a grey box with a black border, but you can style it anyway you like, including adding background images etc. To change the CSS, insert the following to the CSS file of your current WordPress theme:

.moretext {
  border: 1px #000000;
  background: #cccccc;
}

.moretext a:hover {
  background: #ffffff;
}

There you go, you can now customize the “read more link” by changing the text and the appearance of the link

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
fold-left fold-right
About the author
Jørgen Nicolaisen has been passionately interested in everything online since 1995. His experience is based on working with small hobby projects as well as high volume websites. Jørgen is currently focused on the PHP based programming framework - Codeigniter, and WordPress naturally

Comments are closed.