Filter shortcodes from slider?


#1

Is it possible to filter shortcodes out from the text displayed on the slider images? I often open posts with images, and my displayed text ends up being a lot of ‘[caption id="" align=“alignright” width=“150”]’ kind of stuff rendering the slider pretty much unusable.


#2

You need to edit the theme a bit for this. Go to /inc/slider/slider.php and on line 61 find this:


<?php echo wp_trim_words( get_the_content(), 30, '[...]' ); ?>

Replace it with this:


<?php echo strip_shortcodes( wp_trim_words( get_the_content(), 30, '[...]' ) ); ?>

Thanks for your feedback, this will be added to the next theme update.


#3

That did the trick perfectly.

Thanks for the theme it’s been great to work with while we’re getting things started!