• Hi. BB Code is spat out in excerpts for me instead of being parsed. Any settings I need to tweak? I saw in previous release notes that this issue came up before. Let me know if there is any info I can provide to make this clearer. Unfortunately I cannot show the site in progress.

    thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • WordPress should really strip shortcodes for excerpt use, but that’s a discussion for another day.

    Try adding this to your theme’s functions.php file:

    add_filter( 'get_the_excerpt', 'do_shortcode', 5 );
    Thread Starter Justin

    (@instantok)

    Totally hear you. Thanks for the code snippet. I was able to create a similar effect using a custom field and some notes from another discussion on this topic here. I will try this out as well.

    Hey Viper,
    I’d like to remove the shortcode from excepts as well. I’ve added that filter to my functions.php file but no joy.

    You can see my development site here: dev.popmag.com.au.

    This is my functions.php file:

    <?php
    if ( function_exists('register_sidebar') )
    register_sidebar(array('name'=>'Main Sidebar',
            'before_widget' => '<li>',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>',
    		));
    register_sidebar(array('name'=>'Comments Sidebar',
            'before_widget' => '<li>',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>',
    		));
    register_sidebar(array('name'=>'Footer Sidebar',
            'before_widget' => '<li>',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>',
    		));
    add_filter( 'get_the_excerpt', 'do_shortcode', 5 );
    ?>

    -Drew

    PS: I agree WordPress should remove short codes from the excerpt.

    Viper, I found this page which was useful, but my PHP skills arn’t good enough to figure it out.
    https://www.aaronrussell.co.uk/blog/improving-wordpress-the_excerpt/

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Viper’s Video Quicktags] excerpt bb code parsing’ is closed to new replies.