WordPress.org

Ready to get started?Download WordPress

Forums

SyntaxHighlighter Evolved
do_shortcode returns/echos "1" (3 posts)

  1. Cliff Seal
    Member
    Posted 2 years ago #

    I'm doing something a bit more complex for a plugin, but solving this riddle will solve my issue as well.

    In hooking do_shortcode into the_content like so:

    add_filter('the_content', 'show_shortcode');
    
    function show_shortcode() {
    	echo do_shortcode('[html]Text[/html]');
    }

    ...it echos/returns 1. Other shortcodes work as expected, but none of the ones associated with this plugin do. Switched wp_debug on to no avail.

    What am I missing here?

    http://wordpress.org/extend/plugins/syntaxhighlighter/

  2. Cliff Seal
    Member
    Posted 2 years ago #

    I made this work by using echo apply_filters( 'the_content', '[html]Text[/html]');, but I'm still not sure I understand what was happening.

  3. Justin Sternberg
    Member
    Posted 2 years ago #

    Same is happening here.. All I get is a 1!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.