Post excerpt formatting

Hello Vlad,
I searched support forums for this topic but couldn’t find anything. I am really surprised nobody stumbled upon this before. I installed and customized Alizee theme for one of my sites as I really like the design. I increased post excerpt size to 100 words but the major problem I am facing there is that Alizee doesn’t seem to support any formatting in post excerpt. In other words, excerpt doesn’t show hyperlinks, bold or italic, <br>, <p>, <h2>, <h3>, etc. I have similar themes (grid magazine design) used in my other sites and they all show formatting in post excerpts.
Is there an easy fix for this?
Thanks,

Mike

Ok, while I was waiting for response I found the solution. I am posting it here for the benefit of others. If you want formatting in your post excerpts you can add the following code at the end of functions.php (preferably in the child theme, otherwise it will be overwritten with theme update) - see code in this post:

Hello,

Are you sure those themes aren’t showing the_content instead of the_excerpt. I don’t think I ever saw a theme that allows HTML in the excerpt. Could you please show me on of them?
Anyway, this is not something that can be implemented in the theme because it will cause more harm then good for some people. Perhaps only some basics like <strong> or <em>.
Thanks for sharing the code.

Hi Vlad,
Have a look at popular theme Fullby (this is my favorite magazine grid theme), I am also using many non-grid themes that support excerpt formatting such as Carella, Creativity, Flow, Lemisto, Practis, MarketingWp, etc.
Based on my experience, the most important tags to support are (replacing with square brackets, otherwise they will not show here as it converts message to HTML): [em],[strong],[br], and [p]. Supporting [a] should be an option, if you want links on the homepage (e.g. if you run PBN) you turn it on, otherwise it’s off.
Hope this helps,

Mike

Posting Vlad’s lost reply here (my fault):

'Hello,

Just had a quick look at Fullby and Lemisto. As I noted above, they’re using the_content to display the post content, not the_excerpt like Alizee is using. I’m guessing they’re based on manual excerpts rather than automated excerpts like we are. So it’s not quite the same thing. Thank you for taking your time to answer.’