Snippets

Remove all shortcodes from the content

Paste in functions.php.

function remove_shortcode_from_index($content) {
    if ( is_home() ) {
        $content = strip_shortcodes($content);
    }
    return $content;
}
add_filter('the_content', 'remove_shortcode_from_index');

Source: http://www.mrmuh.com/2012/01/wordpress-remove-shortcodes-fro...

Share this snippet

 

Leave a Reply

Your email address will not be published. Required fields are marked *

Please respect the following rules: No advertising, no spam, no keyword in name field. Thank you!