Archived topic
Same style for Excerpt as Single Post
3 replies · Started by A. R. Choudhury on December 20, 2021
Hello, by default, the excerpt includes all the text from the blog post without style. I want to include all the blog post content to be shown in excerpt with style (because my blog post includes only 100 words).
Just look at the archive: https://www.archoudhury.com/blog/
And the blog post I'm talking about: https://www.archoudhury.com/physical-aspect/boost-your-stamina/
Please help!
Hi there,
WP strips HTML tags by default, it's not something that controlled by the theme.
You can have a look at this topic from stackoverflow, you might find it useful:
https://stackoverflow.com/questions/24151161/how-to-prevent-wordpress-from-stripping-html-tags-in-excerpt
Ok. Thanks.
No problem :)
You can give this plugin a try: https://generatepress.com/forums/topic/excerpt-text-html/#post-1692737
Or there's a workaround -- using the moreblock in your posts, so the content before the more block can keep their HTML tags in excerpt. But this have to be done manually in every post.