Forums

[resolved] How to add two polls on same page (5 posts)

  1. kzq
    Member
    Posted 2 years ago #

    I am using WP-Poll plugin. I want to publish two or more than two polls on a single page. Here is the code but how to do that?

    <?php if (function_exists('vote_poll') && !in_pollarchive()): ?>

  2. <h2>Polls</h2>

    • <?php get_poll();?>

    <?php display_polls_archive_link(); ?>

  3. <?php endif; ?>

    Note: To show specific poll, use <?php get_poll(2); ?> where 2 is your poll id. To show random poll, use <?php get_poll(-2); ?>

  • Lester Chan
    Member
    Posted 2 years ago #

    then use 2 codes?

    <?php get_polls(1); ?> and
    <?php get_polls(2); ?>

  • kzq
    Member
    Posted 2 years ago #

    Thanks for your reply but I am looking for a code which help me to publish top recent 5 polls. If I follow your code then I need to update poll ID 1,2,3,4.... every time and update the website php code.

  • Lester Chan
    Member
    Posted 2 years ago #

    Sorry there is no such feature/function in WP-Polls.

  • kzq
    Member
    Posted 2 years ago #

    hmm this is a problem them.. anyway thanks

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags