The 2 Methods of Showing Excerpts
147
Photo by Linek There are many reasons to choose to publish either full posts or excerpts on the homepage. Full posts are very simple to implement. You simply write, then publish. However, if you have chosen only partial posts, then WordPress users have two different methods which will achieve the same effect.
Method 1: The More Tag
This method is usually the easiest of the two. When you have written your post, select where you would like to make the cut-off between the partial post for the homepage, and the rest of the page, then click the More button ().
Your homepage, and category pages, will now display only the first section of the post, and a line of text linking to the rest of the article. This line defaults to, “Read the rest of this entry »”, but can be easily changed. Open your index.php template file, and change the following line: (Make sure you retain the quotation marks!)
<?php the_content('Read the rest of this entry »'); ?>
Method 2: Post Excerpts Function
To use the post excerpts function, you will need to edit your template’s files, namely those controlling your home and category pages (These will be home.php and category.php if you have them, and index.php if you don’t). First off, replace the following line:
<?php the_content('Read the rest of this entry »'); ?>
with:
<?php the_excerpt(); ?>
Your pages will now show the excerpt. However, to load the post, your readers will have to click the post title. This isn’t optimal (Why force your readers to scroll back upwards, to continue reading onwards?) . To solve this, we will add a link below the content, which can be used to load the rest of the article, similar to the one generated by the <!–more–> tag. Beneath the line we just edited, add the following:
<a href="<?php the_permalink(); ?>" title="Read the rest of <?php the_title(); ?>" class="more-link">Read the rest of this entry »</a>
It would also be recommended that you customise the text.
By default, WordPress will now show the first 55 words of your post. You can change this however, by pasting what you want to be shown into the “Optional Excerpt” box in the Write Post screen. This box understands code, so if you intend upon including images in the excerpt, then you can copy and paste directly from the Code View on the Write Post page.
Through using this method, you can choose to display different text on the homepage than what is in the article. For instance, you may want to write a summary of the article to come, not merely quote the introduction. Another use is that if you choose to split the excerpt from the post in the middle of a list, you can add the </ul> tag to the excerpt, to ensure your homepage continues to validate (Not overly important by any means, but it is nice to do).
Both of These Methods Will Publish a Partial RSS Feed
Sadly, WordPress does not natively support the feature of allowing you to continue publishing full-text feeds, when you use either of these methods. However, you can get around this by installing Ronald Heft’s Full Text RSS feed plugin.
And yes, this does mean that Pro Blog Design is returning to full-text feeds! Apologies for sending out partial feeds for the past week or so.
Enjoy this post? You should follow me on Twitter!
Nice post. I don’t think you really need all those coding though. As long as you set a summary, your excerpts should be fine.
i tried the method 1 but no go. it previously worked with coding on index.php on an independent site index.php that just showed excerpt from my blog sub folder in same site. here’s the code .. not sure if it’s correct i had changed it and then the “read more” link didn’t work.
require(‘wp/wp-blog-header.php’);
?>
in your method one do you need a closing </more tag?
sorry. here’s the code within a tag. i hope
[code]require(‘Blog25/wp-blog-header.php’);
?>
[/code]
if i change the template files will the excerpt show up on my independent site. Still crazy after all this time.
i don’t want to mess all up if it doesn’t work. sorry but i’ve almost had it with wordpress.
under which folders are the template files: home.php and category.php if you have them, and index.php. i will try it. i’m determined to get this working. please help. i don’t want to be spoonfed just pointed in the right direction. i think i know what direction you want to point me :>)
Thanks,
Your post solve my problem to show of whole posts on home page. I didn’t need to add “Read more ” tag in my template, because it already available in my template. I am not aware about “‘. This small tips help me to end my search of week,almost 10 hours work on net.
Thanking you.
Oops, feel free to ignore the last comment I left on your previous post then!
Sly – The codes are just way of controlling what is shown, and how. :)
Kristarella – lol. Thanks for pointing it out anyway. That was a mistake on my part. I never intended on partial feeds!
I really appreciate this post.
Although I already knew about the -more- posting function, I had no idea that the Heft plug existed allowing for full feed posts even if I use the -more- technique.
I think Heft’s plugin is right on and much needed.
Judging from his post that you link to, the plugin is very popular and well received.
Now I can offer partial posts on my blog itself and then send out full feeds to my subscribers.
Thanks again for pointing us in that direction.
joseph hollak
http://www.hollakmedia.com
No problem Joseph. I agree that the plugin is an absolute necessity. It really amazed me what the excerpts were doing to my RSS feed, and as you said, it seems that many others were amazed by it as well!
As always with WordPress, someone saved the day with a plugin. ;)
Ooops, I feel even more silly. I started using the more feature and didn’t realise that what you’ve just said in this post applied to it! I’ve installed Heft’s plugin!
where can i find the Heft’s plugin … ?
Kristarella – I made the same mistake! It’s a slight flaw in WordPress I think.
Subcorpus – It’s the link at the bottom of the post. Here you go.
Michael, do you use method 2?
Yep, how’d you know? :)
How can I make a full text post in my blog, and return it only with the first 50 words in feed readers ? Please help
Andreea – What you’re looking for is to use a post excerpt in your feeds. If you use Feedburner on your feed, you can use their “Summarize” option.
Otherwise, you should check out the Dual Feeds plugin.
Hope that helps. :)
It helps more than you think. Thank you very much!
No problem. :)
I have a good solution to this especially if you have too many posts to insert the “more tag” manually.
Post Teaser – This is a great plugin.
http://wordpress.org/extend/plugins/post-teaser/
Ed
Hi Michael,
I am trying to show the first three posts entirely, followed by the next 5 posts with only an excerpt.
How do you think I can optimise Methode 2 to do that?
Thankx in advance,
Tristan
I have been thinking about doing this for a while too glad Daniel gave us some help!@MyStarbucks glad my site is hainvg an effect on you! @Robert that’s the . All my plugins and widgets worked with no problems at all- I was surprised actually, as I have skipped the last couple of updates (I know, shame on me).
Tristan,
You would need to set up two separate “loops” on the page. One would show your 3 full posts, and the other would show the excerpts of the next 5.
Have you used the query_posts template tag before?
Thank you for the quick answer.
No I have never used the query_posts template tag.
I just tried, and can’t manage to make it work…
I get a blank page.
Is there another way?
I can’t use the normal loop, can I? ([code][/code])
In fact, i’m not even sure that’s the best syntaxe for the loop. My theme must be starting to get obsolete…
No problem.
Yep, that’s the start of what you would use. In your index file, could you copy and paste everything from the line
to
Not Found
Sorry, but you are looking for something that isn’t here.
(Or email it to me!)
I’ll send you back the code you need then. :)
Hello.
How i can do two different size with two different excerpt size in WordPress? In example: I want to do first featured post will be 380 character and other posts will be 270 character.
By the way this is my work sample is here: http://www.xhmlmutfagi.com/sinemalardan/
Thanks.
I have a site that shows thumbnail of images of blogs and I want to show . Does anyone of you know how I could show excerpts of only certain post. So instead of showing excerpts from all post, I would only show excerpts from selected post.
sorry ,this is for testing
David,
You would have to use the query_posts template tag to select only the posts you wanted, and then use a normal loop afterwards with the code for showing the excerpts as you want them.
d7nzb09ze7bvsdbl
Muy bueno ….
Hi, first of all I would like to show my appreciation for this useful plugin. However the text is right next to the images making it hard to read, wouldn’t it be good on the next update of this plugin to update to add a invisible border of 5 pixels or something? Anyway thanks again for the plugin exactly what I needed.
Thankyou. This post helped me a lot
Thanks! This helped alot!
Thanks, great post. i have now managed to understand both ways of showing an excerpt. New to this wordpress but thanks to this page learning fast.
This is a great blog, I stumbled upon it and read five posts before leaving. this post in particular helped a lot. I think I am going to start posting summaries. I have a friend who did there site in blogger though that would also like to post short introducrions to longer psts. Do you know how this is done?
Excellent post! Thanks so much. I found this on a search for how to do just this, and then had a real “duh” moment because I’ve been using wordpress off and on for a while now but never noticed the “more” tag option! (doh!)
Looks like a great blog and I will be back to see what else I’m missing that’s right under my nose. Also appreciate the help on the php files and where to find the editing options – thanks!
Very helpful article for my columnists who had questions. Saved me a lot of time, thank you!
Thanks for the excerpt tips. OMG, that stupid button on the WordPress tool bar has been starting me in the face for HOW long? Something so blatantly simple. I knew about it at one point and then I completely forgot about it. I feel like an idiot. Couldn’t see the forest for the trees. Now I’ve got to get busy and clean up my blogs. Thanks again.
Thankyou for the info . We can add a code in the index file to show always an excerpt if you always forget to describe an excerpt with these methods :)
Hi. Thanks for this great tips. Now I know how to control text display for both my index and archive files. Thanks again.
How do you actually select before you click the more button? Can’t get this to work. Is it the cursor, or do you highlight the text that you want to show before the more button?
vicki’s Latest Post: A Conversation with…Carol Poore
Hi Vicki – just use the cursor! Place the cursor after the text you want to show before, and then use the more button to insert the break at that point.
Thanks so much for the insight. I have a small problem though, I have created a centercolumn.php to display the excerpt and when you click on the “READ MORE” it displays the post by itself, but it’s still just an excerpt.
What am i doing wrong?
Thanks a lot for this post. I used this on my blog. Keep up the good work.
I have followed your instructions under method 2, since I am trying to line up all the posts so that the Continue reading is on the same line for all the posts … but somehow it does not work … my website is http://www.commonpeople.sg/v1/
Hi!,
I want to show complete post while opening RSS feed of my blog (http://www.cheapmonthlymobile.co.uk/blog/). How can i do that? I already enabled “Full Text” option in reading section, but doesn’t works? Help Me!!!
Thanks a million
.-= TechThem´s last blog ..Andrea 0.3 Free WordPress Theme By lucianmarin.com =-.
Great post, helped with what I was looking for.
Cheers!
.-= Jason´s last blog ..Edmonton Worldwide Photo Walk Update =-.
I am using feedburner and I have burned the feed with http://www.snaphow.com/feed (I am also using Thumbnail for Excerpts Plugin)
But What Happens is, that they Show the Fullpost in the newsletter….
So I used the Summarize Option to shorten It … But it Removes the Thumbnails.
What I want is to Show a Post Summary with Thumbnail and a Read more Link in the Email Newsletter of Feedburner.
Is is Possible ?
i’m wondering how to use the excerpt as a summary in the article page. somebody has an idea about this?
(btw: @problogdesign: you have a perfectly clear blog-design!)
Thank you very very veryy much!! for the answer. I was looking for the excerpt!.
Muchas gracias amigos!!!
Thank you so much for this helpful post.
Oh fin, I got it …. thanks alot …….
Thanks for the article.
If you want to count your words, you can type “wc -w” (without quotes) in to a Linux command shell (which is what most web hosts offer).
Then paste the first few paragraphs, hit Enter, then Ctrl+d.
The wc command will report the number of words in your text.
Thank you very much! I have been trying to figure this out, but never could, maybe because I am new to WP.
Anyways the more function should come with explanatory just like yours so newbies like me understand it better :)
May the author answer a question for me, Is it good that the Read More, sends you in the middle of the page where the articles continues?
Or would it be better to show up the whole article from the beginning?
Because the Read More , just does the first!
Thanks Michael, this provided a quick solution in simple English!!
very useful thanks very much
You mention that excerpt returns the first 55 words but that can be changed by pasting an explicit excerpt. There’s another way since WordPress v2.7 to change the length for sites that don’t want to craft explicit excerpts and that’s to use a filter hook. Add this to their theme’s functions.php file to set the excerpt to 100 words:
add_filter(’excerpt_length’,’set_my_excerpt_length’);
function set_my_excerpt_length($length) {
return 100;
}
HTH
-Mike
Exactly what I was looking for, although I had to try it out first to find out that it applied to wp.com as well.
Does any one know what the code is that splits the content up? For example, you add it to the Content box and everything above it is displayed on the homepage? I’m using a hosted blog on WordPress.org
hi!
i have tried the more tag and amending the index.php for excerpts. well, i get the excerpts but when i click on ‘more’ or ‘read the rest of this entry…’ it takes me to a page that reads ‘error 404 – page not found’.
can someone please help me solve this.
man i can not find this line
in the home.php and index.php. im using a theme. but in the Category.php i found CLICK TO READ.
should i try the first option and if so, do i have to edit all older posts?
the_excert(); who would have thought. Thanks Michael!
Excellent and informative article, These days It’s so much easier to search for something rather than nutting it out your self.
Helped me so much thank you!
Thanks, it was usefull to me :)
Thanks for the info! It was of great help! keep up the good work!!
haha wow thanks this is exactly what i was looking for.. !!!! every other site kept mentioning excerpt excerpt or whatever that is and i got really confused.. THANKS!!
Thanks for the tip. Helped me out a lot, and it’s very well explained. Much appreciated.
Thank you very much for the article. This is really helpful for me. I wanted to show only the summary of post in my blog. Now I will do it soon.
Thank you. This was really helpful.
wow, so easy! thanks! :D
The above proposed solution is not working in wordpress 3.0.1 using the default twentyten theme. I replaced the_content with the_excerpt in loop.php, and page.php, but it still shows be the entire post. Am I missing something?
I finally used the more tag which works fine.
web designing It is used as a general term to describe to creating and involve in any type of web page.The intent of web design is to create a website—a collection of online content including documents and applications that reside on a Web server/servers. Web design is a broad term used to encompass the way that content (usually hypertext or hypermedia) that are delivered to an end-user through the World Wide Web, using a Web browser. The website may include text, images, sounds and other content, and may be interactive.
web designing It is used as a general term to describe to creating and involve in any type of web page.The intent of web design is to create a website—a collection of online content including documents and applications that reside on a Web server/servers. Web design is a broad term used to encompass the way that content (usually hypertext or hypermedia) that are delivered to an end-user through the World Wide Web, using a Web browser.
I am trying to do the reverse of this with a studiopress theme – Education theme and was wondering how to get the full post shown on the front page. I am part way there using these principles backwards, but the post isnt displaying properly – any advice ? Thanks for the tutorial by the way
Option 2 works great, but I have an issue – option 1 works on all pages for me, but when I use option 2 and type out excerpts, they don’t show on my category pages. Any suggestions?
Thanks!
any plugin have the same function?
nice article
Great article! I’ve been searching for this for weeks. Thank you.
Thank you Michael Martin it really helps me, i used this code in http://www.charteringprivatejets.info category and it’s working fine.
This is awesome! Thanks for the share, it really helped me editing the excerpt function!
THANK YOU!!!! That was the answer I needed for so long. No other web page had this answer. My question was how do you show your image in your excerpt because it wasn’t showing up in the excerpt, only if you put full html, which I didn’t want. So very simple to use the excerpt box… however newbies like me had no clue what that box was really for! Thanks again!
This article is truly relevant to my study at this moment, and I am really happy I discovered your website.
We do a high-quality http://corvallisbuilder.com/ – house walls
Hey, Thanks!
It works so well in my blog.
Very nice tutorial, very easy to follow.
Thanks :)
But, how if I want to make it bold?
So my reader will keep their focus? Thanks
This approach helped a lot of my teamates
search for the_content() and change it to the_excerpt().
Thx
What a great feature – we will use it to avoid Duplicate Content (DC) on our upcomming blogs. Do you know any kind of automatic plugin to convert from full storry to excerpt?
9pM9BH http://djIjw3MnccVop6a5hFgql.com
Wow, thank you for this! I have been looking for resources who could help me in collapsing (noob much, I know) my entries in the home page and they give me all these codes which I don’t have time understanding. Thank you for your inputs! I had my page in order, finally! :)
Hi, I’ve changed my homepage feed to excerpts using the separating tool, however, my posts aren’t flowing on from each other and just show one per column (three column grid) I am using DePo theme on wordpress. PLEEAASSEEE HELP! x
Not sure if this was covered in the comments above but I want to be able to have my embedded videos to show up alone with my excerpts. I used the code you gave us on my home page but it takes out the embed videos.
I’m having some trouble in that I have a static homepage, but I want the excepts only to display on my Posts page. When I use the coding above I get the right outcome for my posts page, but my static homepage turns into an excerpt. . . Is there something obvious that I’m doing wrong here?
You totally ROCK!! Thank you
This was SUCH a useful post! I was struggling to find that bit of coding! thanks so much!
ive used the second method to get his working, however when I click on the read more link it takes me to the post but i can’t see the post at all. All i see is the comment box.
Any ideas?
Hey awesome post, thank you so much. Really simple and easy to follow. Appreciate it :)
i searched for <?php the_content in index.php and don't find it i use the first method and work also home.php the style
Thx Michael :)
hi this is the code of your solution
I have a theme “Carolina” and for me this solution doesn’t work.
Any ideas what I must to do?
Hello Martin,
I’ve recently got interested in Responsive layouts. I have got a copy of Yoko theme and planning to tinker with it. Is it possible to add a box for the post excerpt so that the content will be inside it along with the featured image.
i had tried the code but how to show thumbnail too on excerpt or home page ??
any solution ?
Homes Improvement
I think something like this in functions.php can help
add_theme_support( ‘post-thumbnails’ );
Could I borrow your phone, please? df toplist pthc 876503
The National Gallery topless lolita
316
I’ve lost my bank card artistic nude child 711067
I’m from England free preteen sites 8-PP
Where did you go to university? cartoon+teen+titans+porn 8O
An estate agents Ranchi Porn
ufll
i want to echo limited post excerpt on my web site
can any one help me ?
Nice blog very Nice tutorial thumbs up keep it up
all my fckn problems are solved… LOL Now i can rest in peace… thanks yo!
Very nice blog. Thank you for all.
Used method #1 for post excerpts. Worked perfectly. Many thanks.
Very nice tutorial. Thanks so much! It’s become easier for me to make excerpt :D
Excerpt is EASY! Thanks dude!
Do you know of a short-code plugin that does the same thing?
doesnt work !!! any ideas?
Do you have any dieas how to setup the frontpage with excerpts in the new WordPress version?
Thank you for a great articel and the excerpts are allready in use on categories etc. – I just need it to work at the main page…
Cheers Kokkeskole
ycome back to check it out once more and have subscribedto your RSS feed. Have a fantastic day.
Thanks for writing valuable post regarding the subject. I’m a fan of your site. Keep up the great work.
i, actually love the design of your website. Would you mind telling me what theme you happen to be making use of? I’m new to this and I’m hoping to obtain mine looking anywhere near as cool as yours. Thanks a great deal.
But this 2 method not working for me. where i need to replace the_content(). index.php and is_category(), is_archieve() nothing have the_content(). my website is soravjain.com
Thanks for sharing. it’s useful with me.
Thanks for this post! It’s nice to find something that actually works! cheers!
We are trying to make the search show a summary of page info.. when i search it shows post summary but not the page summary but the whole whole page text… Any ideas?
Try out hunting throughout smaller sized [url=http://www.drisvuittontotebag.350.com/]louis vuitton tote bag[/url] merchants that will hold developer reproductions. Don’t accomplish girls ought to forget about.
In the event you acquire one of many items can be your aim, you’re feeling the purchase price has been too much along with [url=http://aouisvuittonpurse.weebly.com/]louis vuitton purse[/url] your price range. Nevertheless the value can be not cheap.
Suppose you are placing on the [url=http://ertsedlouisvuitton.webs.com/]used louis vuitton[/url] concerning the shoulder to participate a party, you will turn out for being the eye-catcher inside of the crowd as well as the talk inside of the party.
These on-line duplicate [url=http://svuittonmenswallet.yolasite.com/]louis vuitton mens wallet[/url] merchants offer an intensive brochure involving duplicate ladies handbag types are generally instantaneously current in order to meet your hope along with requires of our own buyers.
About three ages immediately after establishing the 1st keep, your [url=http://esrgisvuittonpurses.yolasite.com/]louis vuitton purses[/url] released your cracking open of an London-based keep.
Right now, you are able to get yourself a [url=http://setvuittonpurse.yolasite.com/]louis vuitton purse[/url] as well as existing these types of excellent purses for your valued types.
Thanks so much for this post, it was exactly what I was looking for and it worked.
hello, i just wanna ask if you could provide a code that will trim and show only the text beetween theText Here .. also, a code that will show the text which has a beginning of a word ‘Price’
e.g: post text… Price: $23.99…text text…
the output will be, $23.99
thanks in advance, cheers!
It’s the first time when i’ve seen your site. I can understand lots of hard work has gone in to it. It’s really good.
Thanx a lot..as I m new to wp, so I was searching for the same for my site http://a2zcareerinfo.com
Thanx once again.
where can i find the Heft’s plugin?
I’ve lost my bank card http://ireusay.de.tl preteen slut bbs damm she is a good fuck i would fuck her and guess what we got a reality star brandi c. from rock of love dam bret u missed out !P
I’m sorry, she’s http://lokybolyjaha.de.tl preteens lesbians mpegs shes fine as hell. id love to play with those gorgeous tits and get deep in that pussy all night.
I think using a plugin will be the best way to achieve this if at all there is any post excerpts plugin available.
Well, my theme “genesis” has inbuilt post excerpts option and I love that.
This is what i have in the index.php. What do i replace?
hook(‘content_before’); ?>
hook(‘content_after’); ?>
hook(‘main_after’); ?>
I have used wordpress for years, finally I know how to make an excerpt!!!
!!!!!
Thanks a lot for this post! I struggled for ages trying to get this done, but thanks to you – I’ve now done it :)
Your post is very useful, thank you for sharing it with us.
Thank you so much for this great post. It was exactly what I was looking for and it worked.
Thanks, i solved my problem according your post and it was what i was looking.
Thank you!!!
Hey there, I ma trying to make my excerpts pull multiple images from a post, do you know how to make this happen?
Here’s the inspiration: http://www.101cookbooks.com/index.html