Skip to content

Excerpts

All written WordPress works require excerpts. Excerpts are exactly what you think. By default, WordPress will automatically create an excerpt for a written work by merely using a configurable number of words or characters from the beginning of a work. For example, the excerpt for this post is this:

All written WordPress works require excerpts. Excerpts are exactly what you think…

Excerpts are required for various technical reasons, none of which is worth getting into here. I just want people to know that they exist, how they work, and that we use them. If any contributor wants to provide direction or sugestions for how their work should be excerpted, we are happy to oblige.

The WP generated excerpt works acceptably for large blocks of text such as articles, essays, or blog posts. They don’t work well for anything that isn’t a paragraph. A key limitation is that they ignore line breaks. This is made even worse by not replacing line breaks with anything, not even a space.

For example, here’s a poem which requires extra spaces in the lines:

Some say
the world will          end
in fire

Some say                in ice

A WP generated excerpt will look like this:

“Some saythe world will endin fireSome say in ice”

Fortunately, we can create a custom excerpt. Unfortunately, the display of custom excerpts still has some limitations. They can include line breaks, but they cannot display extra white space. (See The Challenge of Special Formatting for more about that.) To improve the excerpt above, we could use this:

“Some say
the world will
end
in fire

Some say
in ice”

This is admittedly better, but how much better varies a lot, depending on how atypical a particular work is in this regard. So better for some, not for all. That’s why you see some of the work excerpted here with slashes. Using slashes to separate phrases or blocks of words is sometimes used when quoting poetry for reviews or other types of articles. That’s why you’ll see some excerpts here look like this:

Some say / the world will / end / in fire / Some say in ice

We don’t have hard rules to determine which approach will be used. Some poems get the first treatment. Others get slashes. In some cases, such as with essays or prose, we feel that the WP auto-generated excerpt is sufficient. It’s always a judgement call. All contributors are encouraged to let us know if they have any preferences or concerns about how their works excerpts will appear. Just get in touch.

Leave a Reply

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

Copied!