Created
September 14, 2016 21:25
-
-
Save ericdebelak/aa061137833c326ef989ce468b8ac306 to your computer and use it in GitHub Desktop.
Allow iframe and other tags in WordPress excerpt or content limit
This file contains 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
<?php | |
// Don't Strip HTML from Excerpts or Content Limit | |
add_filter('get_the_content_limit_allowedtags', 'childtheme_custom_allowedtags'); | |
function childtheme_custom_allowedtags() { | |
return '<script>,<style>,<strong>,<b>,<br>,<em>,<iframe>'; //add whatever tags you want to this string | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment