I hate it when WordPress strips out all my html in my excerpts. I know there’s a reason for it, but I put that HTML there because I need it.
Here are my solutions:
For Genesis
add this code to your functions.php file-
add_filter('get_the_content_limit_allowedtags', 'childtheme_custom_allowedtags');
function childtheme_custom_allowedtags() {
return '<script>,<style>,<b>,<br>,<em>'; //add whatever tags you want to this string
}
Just remember to change “childtheme” to the name of your theme.
Thanks to http://pixert.com/blog/enable-formatting-tags-for-content-limit-in-genesis-featured-posts-widget/ for this tip.
If you are not using Genesis,
I found this tutorial very helpful:
http://pixert.com/blog/keep-html-tags-wordpress-limit-posts/