Last active
August 29, 2015 14:09
-
-
Save KFleeger/d67c389c3dc74dad9fea to your computer and use it in GitHub Desktop.
Genesis Fuction - Keep Formatting for Posts When Using a Content Limit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Keep formatting tags when pulling posts with a content limit into a widget area, archive, or template | |
add_filter('get_the_content_limit_allowedtags', 'get_the_content_limit_custom_allowedtags'); | |
function get_the_content_limit_custom_allowedtags() | |
{ | |
return '<b>,<br>,<em>,<h1>,<h2>,<h3>,<h4>,<h5>,<h6>,<p>'; //add whatever comma seperated tags you want to this string | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment