Posted on 13 August, 2009 By Kim Woodbridge 16 Comments

How to Style the Read More Link in WordPress

Read More (by Barry Yanowitz)

Last week I wrote about using the WordPress More tag to control the content displayed on the front page of your blog.

As I mentioned, you can have the More link say anything you want. WordPress also provides a CSS class for the more link that you can use to style it.

 

 

When you use the more tag, you are breaking apart the content of the post in a spot that you determine. The content tag will look like this:

<?php the_content('continue'); ?>

Continue is what mine says but you can change the text between the single quotes to say anything you want. That text will be the link. Stratos has also written a tutorial on how you can have the title of your post in the read more link.

WordPress also provides the CSS class .more-link that can be used to style the Read More link.

Mine looks like the following:

.more-link {
	text-align:right;
	float:right;
	font-size:10px;
	width:72px;
	height:17px;
	text-transform:uppercase;
	padding-right:10px;
	margin-bottom:8px;
	background:url(images/b_more.png) no-repeat right top;
}

This is placing the link in the layout, giving it a font size, making the text uppercase, and placing an image behind it. You can use this class to style you link however you want or make it match your theme. This code goes in your style sheet or style.css file.

If you want to learn more about CSS and what you can use to style your links and other features of your blog, W3Schools is a great place to start.

photo credit: Barry Yanowitz


Related Posts:
  • Using the WordPress More Tag to Control Content Displayed on Front Page
  • How to Style a Sticky Post in WordPress 2.7
  • (Anti) Social-Lists 5/24/09
  • Adding WordPress 2.7 Threaded Comments to your Theme
  • WordPress – How To Create a Static Front Page
  • Posted In : WordPress Tips
    If you enjoyed this post, please subscribe to my RSS Feed

    Post to Twitter   Post to Delicious   Post to StumbleUpon

    16 Responses to “How to Style the Read More Link in WordPress”

    Trackbacks/Pingbacks
    1. Change Colors | Links | WordPress Theme Customizations
    Leave a Comment
    You may use: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .


    Recent Comments

      • Regina Fried: Hi Kim, Yes, I realized I would have to update the file each time WP is upgraded (sigh). It seems like a problem that...
      • Kim Woodbridge: Hi Regina - I have a client on 2.9.2 where the problem just started too - I'm wondering if the webhost changed something...
      • Kim Woodbridge: Hi Keith - Thanks for the info - you have some interesting ideas on how to generate income from a lyrics plugin....
      • Regina Fried: Hi Kim, I'm running WP 2.9.2 on a client's site and just ran into this problem. What do you think of the idea of modi...
      • Keith from shrewdies: Now there's another one (search the WordPress Plugin Database for Happiness Today). Like Hello Dolly, Think Of Happin...
      • Kim Woodbridge: Hi Jake - Thanks for the info. I'm sure there are new themes for video games since I wrote this article a year ago :-)...
      • Kim Woodbridge: Thanks Vered! Some are better than others but it really depends on the materials I'm given to work with....
      • Jake: I found an awesome video game theme for Wordpress, its like nothing you've ever seen before, check it out: ...