Knowledge Base: Excerpts

When you write a post and publish it, by default only the first two paragraphs will appear on the Ratburger home page.  To read the balance of the post, a reader needs to click “[Read More]”, which will display the complete post and its comments.

This is done to allow visitors to the site to skim through the titles and start of posts and decide which they want to read in their entirety.

The definition of “paragraph” is, as with most things in WordPress, a brutal hack based on looking at the text and guessing what constitutes a paragraph.  The way the code is implemented, a heading at the start of the post or a photo is considered a paragraph.  This means, for example, that if you start your post with a heading and a photo, visitors to the home page won’t see any of the text of the body of your post without clicking “[Read More]”.

You can avoid this infelicity by placing an explicit excerpt mark in your post.  This indicates the portion of the post which should be shown on the home page and which subsequent material should only appear if the user clicks on “[Read More]” or the post’s title to read the whole thing.

Post composition toolbar with excerpt marker highlighted

To place an excerpt mark, click on the line which marks the break and click the “Insert Read More” icon (which looks like a two lane road).  It will put a break in your post where the material above will be shown on the home page and that below only to those who “read the whole thing”.

For example, in my Monday Meals post for 2018-08-13, I have a heading, image, and first paragraph which I want to appear on the home page, so I inserted a “Read More” break after the first text paragraph.  If I hadn’t done this, the automatic excerpt generator would have shown only the heading and photo, which would have been less than ideal.

WordPress “shortcode” features which are used for such things as spoiler warnings and including mathematics in posts do not work in home page excerpts.  If your post contains such things, you can use explicit “Read More” breaks to ensure those who visit the home page will not see them.  When a user clicks through to the full post, they will be displayed correctly.

8+

Users who have liked this post:

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar

Author: John Walker

Founder of Ratburger.org, Autodesk, Inc., and Marinchip Systems. Author of The Hacker's Diet. Creator of www.fourmilab.ch.

One thought on “Knowledge Base: Excerpts”

Leave a Reply