I have a site where the shortcodes are appearing in the mobile version of the site. I want to remove them. When I add the below code, it strips out the shortcode and also the text along with it. I want a way to simply ignore the shortcode and leave the text.
Example: "[dropcarp2]G[/dropcap2]o and get a drink" Should appear as "Go and get a drink", but on a mobile device appears as "o and get a drink"(i.e. all text between the shortcode is removed).
Can anyone help?
I have been to functions.php in the mobile theme and added the following lines of code:
function my_shortcode_handler( $atts, $content=null, $code="" )
{
return '';
}
//override the 'dropcap2' shortcode
add_shortcode('dropcap2', '__return_false');
add_shortcode('two_thirds', '__return_false');
add_shortcode('one_third', '__return_false');
add_shortcode('divider_1', '__return_false');
add_shortcode('services', '__return_false');
add_shortcode('one_third_last', '__return_false');