with Lorelle and Brent VanFossen

Solving the WordPress Excerpt Problem – Sorta

The WordPress Blog Excerpt Problem (as I call it) came from the desire to have the first page of my blog, index.php, show only excerpts of the blogs instead of the default, the entire blog. I could easily change the number of blogs shown on the entry page through Options, but I couldn’t figure out how to show the excerpts.

There is a plug-in to make excerpts show automatically, but I can’t get that to work either, even after asking in the WordPress Forums, which are usually terrific. Guess my question was too simple.

Anyway, I haven’t solved the Excerpts plug-in problem, but I now have a better understanding of the problem and how to make this work without the plug-in. It’s so simple, it really gets me that it wasn’t explained in a simple fashion.

In the WordPress editing window on the quicklinks bar there is a tag for “more“. In the place you want a link for “more” to be seen on the main index.php page, click on the “more” tag. It puts a jump link in the blog which appears on the main page making the blog entry appear to be an excerpt.

So your line in your entry would look like this:

This is the last line of a blog entry with a paragraph underneath and I'm writing it today. <!--more-->

This is the second paragraph I'm writing underneath that isn't seen on the first index.php page but will be seen with the entire blog entry when you click the "more" jump hyperlink.

This creates a link that jumps to your full blog entry and then down to the targeted link point so the reader can keep reading at the spot. In the full blog entry, the jump link is gone as that is the target point. Very slick.

Where you set the “more” tag, it shows up. If you set it at the end of the line, it will show up at the end of the line. If you set it between two lines, in the blank “line” between paragraphs, it will show up under your last text line on a new line on the index.php page, but on your main blog entry, it will not show the “blank” line between paragraphs (if this is your style) but no line between those two paragraphs. The link shows up where you put it and you have to take that into consideration on where you put the “more” link tag.

I’ve edited back an entire month to put the “more” tag in my blog entries and now the first page looks great with “excerpts” instead of the whole entry. I’m thrilled.

Lorelle
Tulsa, Oklahoma

> > > Later: There is a new section in the WordPress Documentation site called the Codex that goes into great detail about how to use this more quicktag button and how to customize it. You can find it at Customizing the Read More for Excerpts for WordPress.

Even Later: The answer was much easier than I thought. In the index.php template file, or any WordPress template file that displays more than one post at a time, like the archives, search, category, etc., simply find the_content() template tag and change it to the_excerpt(). Instant excerpts. Wow! Too simple.

8 Comments

  • WordPress › Error

    There has been a critical error on this website.

    Learn more about troubleshooting WordPress.