I am trying to customize my frontpage and currently i'm confused why i can't get rid of the figcation in the excerpt.

As far as i know the_excerpt()should already remove tags and shortcodes. Just in case i tried strip_shortcodes( the_excerpt() ); to get rid of the figcaption. Doesn't work.

It's just a regular image with a caption.


Use directly in the templates.

echo strip_shortcodes( get_the_excerpt() );

how does it work as follows ?

add_filter('the_excerpt', 'strip_shortcodes');


add_filter('get_the_excerpt', 'strip_shortcodes');

Your Answer

