Remove shortcodes from auto excerpt
-
I just posted this in a resolved thread. So here it is again in an unresolved thread. Admin please delete if this isn’t correct.
I’d like to remove the shortcodes from the_excerpt too. But I can’t get it to work. Is my functions.php correct?
<?php if ( function_exists('register_sidebar') ) register_sidebar(array('name'=>'Main Sidebar', 'before_widget' => '<li><div id="%1$s" class="%2$s">', 'after_widget' => '</div></li>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>', )); register_sidebar(array('name'=>'Comments Sidebar', 'before_widget' => '<li><div id="%1$s" class="%2$s">', 'after_widget' => '</div></li>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>', )); register_sidebar(array('name'=>'Footer Sidebar', 'before_widget' => '<li><div id="%1$s" class="%2$s">', 'after_widget' => '</div></li>', 'before_title' => '<h2 class="widgettitle">', 'after_title' => '</h2>', )); add_filter('the_excerpt', 'do_shortcode'); ?>
Thanks for the help!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Remove shortcodes from auto excerpt’ is closed to new replies.