Homepage Excerpts WordPress Plugin

by Daniel in 241 Comments — Updated Reading Time: 3 minutes

I am glad to finally release Homepage Excerpts, a WordPress plugin that I have been developing with a friend for some time already. The plugin has two main objectives. The first one is to make blogs that use full posts on the homepage more search engine friendly. The second one is to give flexibility to people that want to use both full posts and excerpts on the homepage.

Homepage Excerpts for SEO

We are all aware that Google and other search engines penalize websites that contain duplicate content. Ideally, therefore, the content of your posts should be displayed fully in one location only, and that is the single post page.

Most blogs, however, display full posts on the homepage as well, and the posts remain being displayed in full even when they slip out of the homepage into page two, three and so on.

The Homepage Excerpts plugin can be used to reduce this duplicate content while keeping full posts on the homepage. Suppose you have 8 full posts on the homepage. Once you activate the plugin you will have the option to select how many posts to display fully in the homepage. The options will go from 1 up to 8. If you select 8, all your posts on the homepage will keep being displayed fully while all the other posts (the ones on page two, three, four and so on) will turn into excerpts.

Homepageexcerptsexample.gif

Remember that new pages usually take one week or more to get indexed by search engines, so that by the time your single post page gets indexed the post will already be out of the homepage, and it will be displayed as an excerpt, removing the duplicate content issue.

Apart from SEO benefits this change might also improve the user experience. Displaying only post excerpts on the subsequent pages will make it easier for readers to scan them quickly while searching for the post that they are looking for.

Homepage Excerpts for Layout

The plugin can also be used if you want to use an hybrid layout on your homepage, displaying the most recent posts in full and the older ones with an excerpt. On this blog usually I display the most recent post in full while making the others show excerpts, so that the reader can scan quickly through all of them. Some other people might want to display half of the posts on the homepage fully and the other half with excerpts. With the plugin you have complete control over this.

Homepageexcerpts.gif

Notice that you can also select if the plugin should extract the custom excerpt from WordPress (the one that you insert manually when writing an entry) or if it should automatically grab the first X words of each post, where X is a number that can be specified on the options panel.

Installation

  1. Download and unzip the plugin
  2. Uploade the file homepage-excerpts.php to your plugin directory. (Usually
    located in wp-content/plugins/)
  3. Log into the WordPress control panel, then go into “Plugins” and activate the
    plugin
  4. Still inside the WordPress control panel go into “options” and then “Homepage Excerpts”
  5. Update the plugin options as appropriate

Share this article

241 thoughts on “Homepage Excerpts WordPress Plugin”

  1. A thousand thank-yous! This is exactly what I was trying to accomplish with my menial coding skills. You have saved me hours of hair-pulling and head-beating. Bless you.

    *skips away singing a happy tune*

    Reply
  2. I tried to change things in the theme files, but I don’t inderstand php very well. I started searching the web and I found your plugin and I’m using it! Thank you very much!!!

    Reply
  3. Great plugin. However I cant seem to excerpt the categories/archives. Dan I saw how to excerpt archives on youtube but I dont even have a archives.php file on my theme. how can I excerpt archives and categories?

    Reply
  4. Here’s the problem that I am having:

    For some reason I can’t use the excerpts feature on the theme that I have. I can only use the ‘more’ tag. But I want to use the excerpts feature on my homepage.

    Will this plugin allow me to do that?

    Note: I don’t want full posts on my homepage. I just want excerpts.

    Reply
  5. Daniel

    Thanks for the plug-in, it was exactly what I needed. I do have a problem though. I have set controls to display the top two posts in full and everything else shows excerpt and continue reading.

    My problem is that links to other blogs, newspapers and the like disappear when the continue reading option kicks in. Do you have any code suggestions that keep links to other sites working after your plug-in does its magic?

    Thanks … Jolyon

    Reply
  6. @Spanish SEO, you would need to open the php file of the plugin and modify the “continue reading” message to whatever you want.

    @Sid, best way to solve this is to make the plugin grab the optional excerpt field, so you can add anything you want to go to the homepage there.

    @G, just use the optinal excerpt field on wordpress, and put the image code there.

    Reply
  7. Could anyone help me with tweaking the PHP code so the images stay on the excerpts? That would be great help.

    Contact me on my blog or email me at gerard AT slashdox DOT com. Thanks!

    Reply
  8. Hi Daniel,

    I am a noobie in bloggin thingy just downloaded the plugin andit works like a charm bt i had set the nor words to take as 60 as i had edited the php script… now the prob is its cutting short half way of the sentence and it makes no sense of it .. Please tell me how do i add excerpts tag in ma posts so tht i can select tht onyl this sentence has to come as excerpts on ma homepage..

    thanks and regards
    SId

    Reply
  9. Hi there,

    Thanks for the plugin. I installed it without any problems, but for odd reasons it does not show the first post full. They are all excerpts.

    Also, in line 59 how can I use the title post as anchor text instead of “continue reading”.

    Your help is much appreciated.

    Reply
  10. I have 7 article per page, i don’t get it, i tried 1 article to be displayed fully but still showing the article as excerpt.

    Reply
  11. Grea plug in definitely it will be useful when it comes to me putting a blog on wordpress which will hopefully be soon, still contemplating whethers its worth starting another site yet.

    Reply
  12. awesome SEO plugin.

    But in a few months every wordpress blog uses this and other plugins sow they will become useless i think…

    Reply
  13. TeÅŸekkür ederim bu güzel eklenti için, blogun seo suna katkı da bulunacak 😉 … (Tükrçe – Turkish)

    Thank you very much this plugin… (English)

    Reply
  14. OK Daniel, since the clash with the mediacaster plugin can’t be fixed (for now) i would like to show the first post fully and the rest only the title and the footer. So no excerpt at all. That would be a way to work around the fact that my videos get shown. Is there any way to do that?
    thanks
    Gert

    Reply
  15. Great plugin. Thank you very much for taking the time to create and share it with the WP community. The time to create is one thing. I’m sure the time to answer everyone is just as time consuming, so double thanks.

    ps: I’ll add my vote on showing images …

    Reply
  16. Note: in WP version 2.5

    # Still inside the WordPress control panel go into `options and then `Homepage Excerpts

    should be

    # Still inside the WordPress control panel go into `settings and then `Homepage Excerpts

    Reply
  17. Gert, that is something that we can’t fix right now. It would involve checking what is the part of the plugins that is clashing and fixing it (i.e. a lot of time).

    Sorry about that.

    I just fixed the option to have all posts as excerpts though, so just download this new version if your old version still had a limit of 1.

    Reply
  18. hello Daniel,
    is there any news yet about the use of the mediacaster plugin together with yours? i can’t get the movies out of the excerpts..

    thanks

    Reply
  19. Hey Daniel. Neat plugin. I was wondering thought what’s to be changed if lets say i want to display only excerpts on my home page and not even a single full post.

    Reply
  20. hello Daniel, that is true for the Youtube videos. It is not true for the mediacaster videos. I have added an optional excerpt for my last 3 posts and still the videos get shown

    settings:
    Number of posts to be displayed fully: 1
    Use custom post excerpt? Yes
    If not using post excerpts, grab the first X words from the post: 25

    see:

    Reply
  21. @Vikrant, it depends on dozens of site-specific parameters. TechCrunch or the NY Times might get indexed after 2 minutes. I doubt that a small blog will, though.

    @Gert Leroy, use the option to use the WP optional excerpt, and then for each post you paste just the text you want below the text editor on the “Optinal Excerpt” area.

    Reply
  22. Saying that search engines take a week to index the content is absolutely wrong. As far as Google’s indexing of blogs is concerned, it is as fast as 2 minutes from the time of publishing

    Reply
  23. Hey Daniel,

    as Dan said in comment #94, there is still no option to select 0.

    For everybody else, switch

    for ($i=1;$i

    to

    for ($i=0;$i

    Alex

    Reply

Leave a Comment