Last active
October 2, 2017 08:14
-
-
Save SanjeevMohindra/5c9d86b7290e1a42657d5510342d08aa to your computer and use it in GitHub Desktop.
Remove ShortCode from WordPress while keep displaying the content
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 | |
/** | |
* 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