HelpSpa
Search HelpSpa.com

WordPress: Limit Text of Post Without Using More Tag

We all know that the “more” tag in wordpress allows you to place a break in a post in a specified position. But what if you wanted to cycle featured posts on your wordpress blog and you didn’t want to add a “more” tag to every post (or have to go back and add a more tag to hundreds of old posts)? There are plugins available to do this but I tried a couple and didn’t have success. The easiest way I found to handle this situation is by using the_excerpt() instead of using the_content().

By using the_excerpt(), wordpress will automagically use the except text from your post or it will use the first 55 characters provided you don’t have any text in your excerpt. For someone like me who doesn’t like to use arbitrary “more” tags, this method is great. You can alter the number of characters displayed as well as make other customizations. The codex for the_excerpt() can be found here.

I like using plugins to get thins done in WordPress, but oftentimes some simple and straightforward coding is the simplest and fastest way to go.

Tagged

Related Posts

2 Comments

  1. jaffaApril 6, 2011 at 5:33 pmReply

    How would you increase the number of characters when using the excerpt? I woudl like more that 55 but can’t find a solution

  2. David WApril 6, 2011 at 9:36 pmReplyAuthor

    See if this helps you…

    http://www.lancelhoff.com/change-the-excerpt-length-wordpress/

Leave a reply

Your email address will not be published. Required fields are marked *

*

| More

SpiderOak Online Backup, Storage, Access, Sync, and Sharing

We are currently offering a free copy of our 16-page eBook, "How to Organize your Digital Photography Collection" to everyone who signs up for our free newsletter. This eBook will review how to organize your digital photos, discuss metadata, and give you an overview of software than can help you with your digital photography workflow. Sign up in the signup area, located in the right-side column of every page on this site, and read your copy now!


Twitter Update