How to Remove shortcode from home but not single posts

Adding this snippet to the functions.php of your wordpress theme will strip shortcode from your home page / index but not from single or archives posts.
( click code to copy )wordpress snippet : PHP
<>
function remove_shortcode_from_index($content) { if ( is_home() ) { $content = strip_shortcodes( $content ); } return $content; } add_filter('the_content', 'remove_shortcode_from_index');
( WordPress codex functions, hooks, in this snippet. )
home, the_content, add_filter, remove_shortcode, strip_shortcodes, is_home,