Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12464

    I’m trying to get a third party widget to display it’s data in the slideshow format. I’ve tried using this code inside the widget code

    Code:
    <?php echo do_shortcode (‘[slideshow]’) ?>

    .

    The problem is the shortcode is not executing, it is being outputted as text. Any idea what the problem is?

    Thanks

    #75575

    I believe you would need to do something more along lines of this example:

    // In case there is opening and closing shortcode.
    echo do_shortcode('[iscorrect]'.$text_to_be_wrapped_in_shortcode.'[/iscorrect]');

    From: http://codex.wordpress.org/Function_Reference/do_shortcode

    So that the shortcode is opened and closed.

    Regards,

    Devin

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Shortcodes in widgets’ is closed to new replies.