×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: schos holler
Added: Jun 27, 2017 9:49 AM
Views: 5
Tags: no tags
  1. function wpex_fix_shortcodes($content){
  2.     $array = array (
  3.         '<p>[' => '[',
  4.         ']</p>' => ']',
  5.         ']<br />' => ']'
  6.     );
  7.  
  8.     $content = strtr($content, $array);
  9.     return $content;
  10. }
  11. add_filter('the_content', 'wpex_fix_shortcodes');