How To Add Shortcodes To Search Excerpts

How To Add Shortcodes To Search Excerpts

14/05/2018

By default, shortcodes are going to be stripped from search result 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 search results excerpts, then you can follow the steps below.

1. Edit search.php file in theme and find:

Copy to Clipboard

2. Replace it with:

Copy to Clipboard
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