Support » Plugin: YOP Poll » Conditional display of poll

  • Resolved rrjmdpa

    (@rrjmdpa)


    I’ve been using wp-poll for awhile and need to change due to lack of needed functionality. I can’t find in your support documents how to conditionally add a poll for example to the single.php file.

    Under my old wp-poll system it was simply to:

    <?php if (function_exists('vote_poll') && !in_pollarchive()): ?>
          <div class="module module-poll">
            <!-- <?php get_poll();?> old wp-poll code -->
          </div>
          <!-- /.module -->
    <?php endif; ?>

    I need the YOP equivalent for the “function exists” and the “not in archive” logic – i.e. in case the plug-in isn’t functioning or is deactivated or is on the poll archive page; and,

    I need the php equivalent command to insert the poll html code. I don’t always have an active poll and want it to display the results of the old poll until a new one is posted.

    I haven’t yet looked at the css styling but I use .button classes etc so I’ve got to figure out where to find those templates.

    Can anyone help?

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

Viewing 1 replies (of 1 total)
  • Plugin Author YOP

    (@yourownprogrammer)

    Hello

    You can use the code below

    <?php echo do_shortcode('[yop_poll id="-1"]'); ?>

    Please let us know if this is what you are looking for.

    Best Regards,
    YOP Team

Viewing 1 replies (of 1 total)
  • The topic ‘Conditional display of poll’ is closed to new replies.