New Category / Date / Tag Archives

By Richard X. Thripp at 2008-09-01T02:18:02Z in News, with these tags: archives, blogs, excerpts, features, images, posts, presentation, search, jump to comment form. 278 words.

Tag, date, and category archives have a new format: they show the first 100 words of each post, including HTML and images. To read more you have to click “CONTINUE READING.”

Before, they were full-text just like regular pages, basically becoming a holding pen for posts. Most people browsing archive pages don’t want to read everything; they’re skimming for information. But the reason I refused to use WordPress’ the_excerpt tag is because it strips images or HTML. Since my Thripp.com blog is a photo-blog with the photos at the top of each post, that is unacceptable.

After much searching, I’ve found a better way: a plugin called The Excerpt Reloaded. It lets you customize the excerpts by using a new function, the_excerpt_reloaded, instead of the_excerpt. I’ve customized and activated it for all blogs on Thripp.com and DaytonaState.org.

I dropped the file in the mu-plugins folder, after removing the changelog to possibly save resources. Since the Thripp.com network only has one theme, I just edited index.php to use the_excerpt_reloaded on archives and category/tag pages. I don’t use separate templates for those pages; I just use conditional tags in one index.php file.

if ( is_category() || is_archive() )

the_excerpt_reloaded(100, ‘<a><abbr><acryonym><b><blockquote><code><em><i><strike><strong><u><img><p><ul><li><script><h1><h2><h3><h4><h5><h6>’, ‘content’, true, ‘… CONTINUE READING’, false, 1, true, false, ‘p’, ‘Click to see whole entry.’, 1);

else the_content(__(’… CONTINUE READING’));

It’s as simple as that! Check out an example here. This is easier to skim, looks good, and will help our Google ranks.

Remember that when you write or edit a post or page, you can enter your own excerpt under Advanced > Excerpt, and that will be used instead. I never enter an excerpt… I don’t think it’s worth the effort. But you can if you’d like.

Post to Twitter Post to Plurk Post to Delicious Post to Digg Post to Facebook Post to MySpace Post to Ping.fm Post to StumbleUpon




Have no fear — commenting is here. Comments RSS feed.

These HTML tags work: a href, abbr, acronym, b, blockquote, code, em, i, strike, strong, u. You will be emailed if anyone replies to your comment. Gravatars work here. Thanks for commenting!