WordPress.org

Ready to get started?Download WordPress

Forums

Simply Poll
Simply poll integration in template (3 posts)

  1. gillouze
    Member
    Posted 2 years ago #

    Hi, I would like to integrate directly my poll in my sidebar.php
    If I add [poll id='1'] , it doesn't output the 'rendered poll'.
    How do I have to make to integrate it in a php page and not via the wysiwig wordpress text editor?

    http://wordpress.org/extend/plugins/simply-poll/

  2. WolfieZero
    Member
    Plugin Author

    Posted 2 years ago #

    Where the content is outputted in the theme, you need to wrap the output var in do_shortcode() (see codex). For some odd reason, by default that filter is only applied to the post/page content by default.

    So you need to have something like <?php echo do_shortcode($sideContent); ?> or varient of.

    I've had a few people ask me how to fix this and I'm thinking I might widget it for the next version.

    Hope that helps!

  3. kaotik78
    Member
    Posted 2 years ago #

    Couldn't you just add
    add_filter('widget_text', 'do_shortcode');

    to the functions.php file to use the shortcode in the widget?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic