Home > Forum

Support Forum

ShortCode not working in Excepts

ShortCode not working in Excepts

Postby skipping » Sun Jan 23, 2011 11:28 pm

First let me say THANK YOU for a great plugin to WP. It has eliminated a lot of redundant code from my posts and pages.

I am a newbie to WP so excuse me for my ignorance.

My challenge is that shortcodes (shortcoder included) work great in pages and posts HOWEVER
they shortcodes (shortcoder included) are ignored and displayed as text in the excepts. I realize that this is a general problem and not specific to shortcoder but any guidance in getting this resolved would be much appreciated.

I saw a post on another site that suggested that adding
// ADD Shortcode processing to Excerpts
add_filter( 'the_excerpt', 'shortcode_unautop', 11);
add_filter( 'the_excerpt', 'do_shortcode', 11);

to the function.php would resolve the issue; in my case it did not.

Post excerpts work great both auto and manual and the html I have included does get processed correctly.

Thanks for YOUR time and effort!

[sc name="Section_Menu_AboutUs"] inserted in excerpt and works on the post.
Posts: 1
Joined: Sun Jan 23, 2011 11:14 pm

Re: ShortCode not working in Excepts

Postby vaakash » Mon Jan 24, 2011 10:32 am


Thanks for using my plugin. Do not add priority. Use the below code
Code: Select all
add_filter('the_excerpt', 'do_shortcode');

But make sure that the output is actually given by the "the_excerpt()" function or the "get_the_excerpt()" fuction
Thanks again for using my plugin
User avatar
Site Admin
Posts: 731
Joined: Sun Jan 17, 2010 11:15 am
Location: India


  • Related topics
    Last post

Return to Shortcoder