Things you should know when using post excerpt

June 20th, 2007 § 32

Post excerpt allows you to display only the first part of your blog’s post, a block of content instead of displaying the full post. While many don’t know the real reason behind and just use it to make things more aesthetic, displaying excerpt has got many advantages both in the SEO, monetisation and traffic area. There are also further things you should be knowing and setting up when using post excerpt which I shall be describing in this post.

a post excerpt

why use post excerpt?

  1. Better SEO. Google considers any similar block of content as duplicate. So if you display the full post on the frontpage as well as in the archives(category,month,etc archives), all of this will add to duplicate content which will affect your position in the search results.
  2. To boost speed. When you display excerpt, only a small part of which might be a very long post gets displayed, this preventing your blog from loading the full post on the front/archives page gaining you in loading time.
  3. Providing visitors a choice. If you display full post on the frontpage, and that happens to be a long post, this might discourage someone reading it even if it’s something he needs. Instead when displaying post excerpt, you allow the visitor to have an idea of what the post is about in the excerpt and if that interests him, then he might read further. This saves your visitor’s precious time and encourages them to read more of your post.
  4. For easy submission to bookmarking sites.When you display the full post on the frontpage, people will read it there itself and if they want to submit it to bookmarking sites using buttons on their browser’ toolbar like submitting to StumbleUpon or other such site, then it’s your homepage link that will be sent. On the other hand, if you display excerpt, visitor will have to click to read the full post and make it easy for them to submit to sites using buttons on their browser since they are on that specific post itself.bookmarking posts using stumbleupon
  5. To increase page impressions. This might not surely count as a real reason, but it helps especially if you have opted an ad campaign. Putting people on that post itself will allow you to generate page impressions which in return generate you more revenue without having you to plaster your homepage with ad.

different ways of displaying post excerpt

How your posts excerpts get displayed will depend on where those posts are being displayed and the type of Wordpress template tag code being used for that section. Don’t panic, I shall be explaining you this and all will get really simple.

You can display excerpts 2 ways :

  1. Method 1 : With a read more link which is usually found at the end of the excerpt which when clicked will guide your visitor to read the rest of the entry. When using such type of excerpt, links,images and formatting are displayed within the excerpt. This is usually used on the frontpage(and further down pages) to provide your visitors with a more appealing excerpted content. You can also determine the size of the excerpt getting displayed using the more tag( <!–more–>).(more on this further below)
  2. displaying excerpt with formatting

  3. Method 2 : With no links,formatting or images. Excerpt will only get displayed as a fixed size chunk of text with a trailing 3 dots at the end of the excerpt. This type of excerpt is used when browsing posts in the archives : month,day,year,author or category archives or when displaying search results.
  4. displaying excerpt without formatting

Displaying excerpt on the frontpage

Now you’ve understood the reasons why excerpt is good for you. Displaying post excerpt on the frontpage of your blog is really simple. When you’re writing a post, use the more tag( <!–more–>) where you want the excerpt to end. So when you’ll publish the post, only the part above the <!–more–> will get displayed together with any links,images or formatting in it.

using the more tag to display excerpt

Also, I’m sure if you’re displaying post excerpt on the frontpage, displaying a single post won’t fit things(occupying too less space). You can configure the number of posts which get displayed on the frontpage when you’re using post excerpt by going to your Wordpress admin section > Options > Reading > Under Blog Pages put the number of post you want to display. Use this option only if you’re displaying excerpt, else several FULL posts will get displayed on your frontpage which would surely slow things down.

selecting number of posts to display on frontpage

Displaying excerpt on archives pages listing and search results

Within your current theme’s folder, look for such template file as the archive.php,category.php and search.php if your theme comes with these. Open each one, and look within the post entry the type of template tag being called :

If it’s <?php the_content("Continue reading &rarr;"); ?> , then your excerpt will get displayed as described in method 1 above with formatting, links and images ONLY if you have used the more tag( <!–more–>) in that post. You can customise the text link which you would like to appear at the end of the excerpt by changing the Continue reading to something else like Read the rest of this entry or Read more,etc

Else if it’s <?php the_excerpt() ?>, your excerpt will get displayed as described in method 2 above with no links at the end. A fixed size chunk of unformatted text.

Now it’s up to you to decide whether you want to display the excerpt as in method 1 or method 2. After deciding, you can change the template tag <?php the_content("Continue reading &rarr;"); ?> against <?php the_excerpt() ?> or vice versa to obtain the results you want according to the above described methods.

If your theme doesn’t come with such specific template page, you can configure how excerpt are displayed by opening the index.php found in your theme’s file. Within the post entry div, put the following code instead of <?php the_content("Continue reading &rarr;"); ?> :


<?php if (is_search()) { ?>
<?php the_excerpt() ?>
<?php } elseif (is_category()) { ?>
<?php the_excerpt() ?>
<?php } elseif (is_year()) { ?>
<?php the_excerpt() ?>
<?php } elseif (is_month()) { ?>
<?php the_excerpt() ?>
<?php } elseif (is_day()) { ?>
<?php the_excerpt() ?>
<?php } else { ?>
<?php the_content(__('Read the rest of this entry &raquo;')); ?>
<?php } ?>

Above the code will have you display excerpt as in method 2 for search results, category, year,month and day archives while displaying excerpt as in method 1 for the frontpage posts.

Choosing what to display in excerpt

If you are using method 2 to display excerpts in archives pages, only the first few lines of the post will get displayed. Perhaps you don’t like this and would like to have another description shown for the excerpt. You can change the excerpt being displayed when writing the post at the Optional Excerpt section. Put a short description there and it’s this text that will get displayed instead of the first few lines of your post.

putting text to be used as excerpt

Displaying full post in feeds when using excerpt

Now one issue that arises when using excerpt for your posts(using the more tag, <!–more–>) on the frontpage is that excerpted post will also get displayed in your feeds which is surely a painful experience for those on feed readers.

You can overcome this problem by first going to your Wordpress admin section > Options > Reading section. Under the Syndication Feeds area, put the number of post you want to get displayed in the feeds at a time in the Show the most recent: field. Then for the For each article, show: select Full Text.

displaying number of posts in feeds

Then download the Full Text Feed plugin. Extract and upload the full_feed.php file to your wp-content/plugins folder. After this, activate within your Plugins section in your Wordpress admin section.

Now full posts will get displayed in feeds even if you’re using the more tag( <!–more–>) to display excerpt on the frontpage.

I hope I’ve covered everything you should be knowing when using excerpt on your blog and how to use it the best way. If you have any questions or need further clarification, do please leave a comment and I’ll be glad to attend to your questions. Don’t miss any such info, do subscribe to my feeds. Thanks for reading.

§ 32 Responses to “Things you should know when using post excerpt”

What's this?

You are currently reading Things you should know when using post excerpt at BlogoSquare.

meta