Guerrilla's Excerpts

This plugin allows more than the built in `the_excerpt` function in your WordPress themes. It lets you choose the excerpt length, choose which html ta

Author:Mike Smith (profile at wordpress.org)
WordPress version required:3.0
WordPress version tested:3.9
Plugin version:1.0
Added to WordPress repository:16-01-2014
Last updated:17-04-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:2
Plugin URI:http://madebyguerrilla.com
Total downloads:1 527
Active installs:100+
plugin download
Click to start download

This plugin allows more than the built-in the_excerpt function in your WordPress themes. It lets you choose the excerpt length, choose which html tags are allowed, the link text to full post, the html container of the excerpt (p, div, span or plain text) and whether to show the smilies that are output.

How to add it to your theme

You will need to find <?php the_excerpt(); ?> and/or <?php the_content(); ?> in your theme and replace it with <?php guerrilla_excerpt('120','Continue Reading','all','p','yes'); ?>. You can also use just the defaults (mentioned below) by adding this code instead <?php guerrilla_excerpt(); ?>

  • '120' is what controls the length of the excerpt output (defaults to '40')
  • 'Continue Reading' is the text for the link to read the full article (defaults to 'Continue')
  • 'all' is the html tags that you're allowing with the output. You can place specific html tags in this space like this <p><a><strong>, you can leave it blank to simply output a large block of text or you can add the word 'all' to use all html tags (defaults to '')
  • 'p' is the container that wraps the link to view the full article. You can use 'p', 'div', 'span', or 'plain' in this spot (defaults to 'p')
  • 'yes' lets smilies show up in the excerpt (defaults to 'no')

A special thank you

I've been personally using the excerpt re-reloaded with my theme development for a couple of years now and it's been working great but I always ran into the same few issues (not allowing paragraph tags, adding a ... to the end of the content automatically, etc) so I decided to finally do something about it.

Without that plugin, this plugin wouldn't exist, so thank you luca.