Jump to content
Sign in to follow this  
Brian

Shortcodes in Excerpts

Recommended Posts

Brian

Hello, for some reason in PL 2.0, placing the code (add_filter('the_excerpt', 'do_shortcode');) in the functions.php file no longer works. What needs to be adjusted for shortcodes to work in the excerpts again? Thanks.

Share this post


Link to post
Share on other sites
Rob
May we have a link to your site? Also, for what purpose are you adding shortcodes to the excerpt? Is this some unique function or action?

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Brian
I don't have a link to the site because it's still in test mode. I've used the shortcodes in the version before 2.0 with the code above. They are being used in the excerpt for a shopping cart plugin.

Share this post


Link to post
Share on other sites
Simon
Shortcodes have always been stripped from platformpro's excerpts as early as version 1.2, same functions are used in FW 2.0. What theme was the above code working in before?

Share this post


Link to post
Share on other sites
Brian
It was/is working, 100%, in PlatformPro, at least the most recent few versions before 2.0 came along. I just had to put: add_filter('the_excerpt', 'do_shortcode') in the functions.php file.

Share this post


Link to post
Share on other sites
Brian
Figured it out. This is the code to make it work. add_filter( 'get_the_excerpt', 'do_shortcode');

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×