How to include html tags within a wordpress excerpt?

Currently in a wordpress template, if you use the code the_excerpt() it will display the first 55 words of a post and strips all html from the post.

I need to include <a href... tags in the excerpt so that links are still visible.

Read More

Existing methods include:

  1. Hacking the wordpress core – definitely not an option.
  2. using a plugin – don’t want to use, it’s dependent on the developer keeping the plugin up to date
  3. writing code within functions.php to re-write the excerpt filter. – I’d prefer not to use this as it might have to be changed in future versions of WP

Is there a filter hook or other known method to include html easily without hacks?

All help is appreciated!
Cheers.

Related posts

Leave a Reply

2 comments