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.

1 Answer 1


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

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.