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

  1. Cliff Seal
    Posted 4 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?


  2. Cliff Seal
    Posted 4 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
    Posted 4 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

  • SyntaxHighlighter Evolved
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.