Skip to content

Instantly share code, notes, and snippets.

@SanjeevMohindra
Last active October 2, 2017 08:14
Show Gist options
  • Save SanjeevMohindra/5c9d86b7290e1a42657d5510342d08aa to your computer and use it in GitHub Desktop.
Save SanjeevMohindra/5c9d86b7290e1a42657d5510342d08aa to your computer and use it in GitHub Desktop.
Remove ShortCode from WordPress while keep displaying the content
<?php
/**
* Remove ShortCode Plugin
*
* This function will remove the shortcode from getting diplayed while keep displaying the content.
* Add this to your function.php
*
* @author MetaBlogue
* @license GPL-2.0+
* @link https://metablogue.com/wordpress-remove-shortcode-plugin/
*/
// Sample Shortcode while keep displaying the content for removing it from display
function mb_shortcode_content( $atts, $content = NULL ) {
return $content;
}
add_shortcode('test1', 'mb_shortcode_content');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment