The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Simply Poll
Simply poll integration in template (3 posts)

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


  2. WolfieZero
    Plugin Author

    Posted 4 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
    Posted 4 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

  • Simply Poll
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic