0

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.

0

Use directly in the templates.

echo strip_shortcodes( get_the_excerpt() );

how does it work as follows ?

add_filter('the_excerpt', 'strip_shortcodes');

or

add_filter('get_the_excerpt', 'strip_shortcodes');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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