captions - Unknow shortcode read on display site

admin2025-06-06  2

I put the caption on a picture like this, the blog looks good,

but in the compact view, I receive this problem

I guess the editor can not read the HTML tag, Is anyone know what happened?

I put the caption on a picture like this, the blog looks good,

but in the compact view, I receive this problem

I guess the editor can not read the HTML tag, Is anyone know what happened?

Share Improve this question asked Nov 27, 2018 at 2:51 baonhgbaonhg 31 bronze badge 3
  • Can you describe what you mean by compact view? Where are your screenshots from? What are they of? – Tom J Nowell Commented Nov 27, 2018 at 3:18
  • That error from my company blog, it means I create a post and when I move to the website, I got an error like the second picture. – baonhg Commented Nov 27, 2018 at 8:18
  • But how is it being displayed? Is that a widget? Where is the code that displays that content on the frontend? – Tom J Nowell Commented Nov 27, 2018 at 16:54
Add a comment  | 

1 Answer 1

Reset to default 0

That's not an HTML tag, it's a shortcode. If your theme used the the_excerpt() function for displaying the 'compact version' of the post content then this wouldn't appear. WordPress strips shortcodes out of post excerpts to prevent this happening.

If your theme is using its own method for generating the excerpt then its developer needs to fix the theme so that excerpts properly remove shortcodes. This can be achieved with the strip_shortcodes() function.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749149193a316784.html

最新回复(0)