Created
January 13, 2016 16:31
-
-
Save stephenbelyea/8568aff939526b107f68 to your computer and use it in GitHub Desktop.
WordPress Fix ShortCode Breaks
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
// Fix WP shortcode breaks. | |
function wpex_fix_shortcodes($content){ | |
$array = array ( | |
'<p>[' => '[', | |
']</p>' => ']', | |
']<br />' => ']' | |
); | |
$content = strtr($content, $array); | |
return $content; | |
} | |
add_filter('the_content', 'wpex_fix_shortcodes'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment