How To Add Shortodes to Strip_HTML Option

How To Add Shortodes to Strip_HTML Option

03/12/2018

By default, shortcodes are going to be stripped from all excerpts. We've done this because if the entire shortcode is not contained within the excerpt limit then it can break and will not display your content as you want in the excerpt. If you would like to add shortcodes back into the excerpts, then you can follow the steps below which will allow the strip_html option to also include shortcodes as well as HTML. By default, the strip_html option only includes or excludes HTML.

1. Edit functions.php and find:

Copy to Clipboard

2. Replace it with:

Copy to Clipboard

Please Note: with this change, the strip_html options in theme options and shortcodes will now do this...

strip_html="true" - this will strip all HTML and shortcodes from excerpts

strip_html="false" - this will allow HTML and shortcodes to show in excerpts

Please note this is a customization that is outside of what we can provide for theme support. If you perform the customization, you will need to maintain the changes for future updates and also be able to troubleshoot any issues that arise. Thank you.

Recent Posts

Recent Tweets

For privacy reasons Twitter needs your permission to be loaded. For more details, please see our Privacy Policy.
I Accept