CoolExcerpt WordPress Plugin

Last modified on April 22nd, 2007

A few months ago, I wrote a flickr plugin for wordpress that integrated with a few different image galleries including Lightbox and Greybox. As last count, 126 different blogs were using the crossroads plugin to show their flickr images in their posts.

While updating my blog theme last night, I realized one of the current problems I have with most of the themes I downloaded. Typically, a theme will present the full content of a few blog entries on the main page. A few of the “cooler” themes I’ve seen only show one post on the main page, which is sort of a neat idea if you don’t write very often, but on blogs with multiple entries per day, it becomes easy for readers to miss posts.

A more common approach I’ve seen on blogs is to show the latest entry in full and also show a few other entries in brief form (what WordPress calls an excerpt). One catch with the excerpt is that it automatically strips out all the HTML code to ensure that the text is brief. Unfortunately for me, since many of my blog entries are photocentric, I lose some of the context about what the blog post is about. For example, if you as a reader were to read the text of an excerpt for a photocentric blog entry, you may not think it was interesting enough to dig deeper, and miss seeing a photo or two. The advantage of excerpts is that you can show more content on your main page without burdening the reader by having to read every entry in full as they progress down your main page.

So, today while sitting at home debating how I was going to fix my door, I decided to write something to address that issue. What I came up with is a new WordPress plugin which I’m tentatively calling “CoolExcerpt.” This plugin scans each excerpt entry and determines whether or not it contains any image or video content and indicates that by displaying related icons underneath the excerpt. In addition, I’ve added some Ajax functionality to automatically show the full content via an excerpt link without having to reload the whole page from scratch.

If anyone wants to test it out and give me some feedback, feel free to download the plugin here. It requires the scripaculous effects library to be loaded before hand, so you must have a theme that uses the library or download the WordPress scriptaculous plugin.

After activating the plugin, replace each instance of the_content() with ds_the_content() and the_excerpt() with ds_the_excerpt() in your theme files.

9 responses to “CoolExcerpt WordPress Plugin”

  1. […] I created a new plugin for wordpress that scans excerpt entries and adds photo and video icons for related posts. You can read more about it here. […]

  2. Hi Duane
    Your new plugin is very impressive, I’ve tested it out on your frontpage!
    This one isn’t so useful to me on my blog as I’m happy with my setup now but its nice to see that when you are developing solutions for your own site, you realise that they could be useful to others and share the wealth!
    Nice work.
    Jono

  3. […] Cool Excerpt scans all post entries for audio and video content (and associated tags), displaying audio or video icons under each excerpt. Also supports Ajax transitions between excerpt and posts inline. […]

  4. […] Cool Excerpt escanea todas las entradas buscando contenido de audio y video (y etiquetas asociadas), y despliega íconos de audio y video debajo de cada extracto. También soportaq trancisiones de AJAX entre extractos y entradas en linea. […]

  5. Ananth says:

    This is what i have been looking for…. cool and thanks… i’ll try it soon.

  6. […] CoolExcerpt Plugin This plugin scans each excerpt entry and determines whether or not it contains any image or video content and indicates that by displaying related icons underneath the excerpt. In addition, I’ve added some Ajax functionality to automatically show the full content via an excerpt link without having to reload the whole page from scratch. […]

  7. Clemens says:

    The link to download the file is not working anymore. Could you please re-post this link?

  8. […] apenas para testes. Fechando parênteses. O assunto que me levou a escrever esta entrada é um plugin que modifica a apresentação do extracto dos posts colocando o icon de uma máquina fotográfica […]

Leave a Reply

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