Shortcodes in Excerpts

Excerpt Background

By default, WordPress does not allow shortcodes to be used in excerpts. Attempting to use a shortcode in an excerpt will result with just the shortcode text being displayed on the front end of the website.

There is a very simple function which can be included from a child theme that allows shortcodes to be used in excerpts.

add_filter( 'the_excerpt', 'do_shortcode');

The WP Edit Pro Way

WP Edit Pro makes this even easier by including an option in the admin panel. Simply check the option; and you’ll have shortcode usage in the excerpt area.

To allow shortcodes in excerpts; go to the WP Edit Pro admin settings page -> General tab.


Josh Lobe has written 54 articles

Josh Lobe is the sole developer of WP Edit and WP Edit Pro. A father of two; a husband to a beautiful wife; and a small home in the suburbs... he primarily enjoys coding in WordPress and designing websites.

Leave a Reply

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


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>