WordPress.org

Forums

WP-Polls
[resolved] Integrate polls into comments (7 posts)

  1. aristidebrian
    Member
    Posted 2 years ago #

    Hello there,

    Fist of all, thank you. WP-Polls is a fantastic plugin.
    I've been using it for a while and I was wondering if it was possible to integrate polls into comments? Then the user could fill his name, adress, the poll and then use the "Submit button" to validate its choices.

    any reply, links, tutorial most welcomed...

    looking forward to reading you

    http://wordpress.org/extend/plugins/wp-polls/

  2. Kangarooo
    Member
    Posted 2 years ago #

    In poll theres log- make people to register.
    Or as opinion poll or google docs forms.

  3. 155actionplan
    Member
    Posted 2 years ago #

    There is actually a way to do this: `<?php
    global $wpdb;
    $rez = $wpdb->get_results("SELECT pollq_id FROM $wpdb->pollsq ORDER BY pollq_id DESC");
    foreach($rez as $poll) {
    get_poll($poll->pollq_id);

    echo "<br /><br /><hr />";
    comments_template('',true);
    }

    ?>`

    Just add: comments_template('',true); after echo of the code you have in your template file or whereever.

  4. aristidebrian
    Member
    Posted 2 years ago #

    Thank you all for your reply.

    155actionplan, your code worked fine!

    I mark the topic as resolved as other members could be interested by the answer.

  5. 155actionplan
    Member
    Posted 2 years ago #

    Glad I could help!

  6. Sorensen84
    Member
    Posted 2 years ago #

    I know this is a old topic, but I need to ask where the code is located. I am not so good with the codes. Shall I add the comments_template('',true); in the plugin editor or in my theme php file?

  7. 155actionplan
    Member
    Posted 2 years ago #

    It depends on where you need it added. It could be page.php or another page template on the site. Where you add that code, it's goin to tell the platform you want to add a comment function. You can hit me up via [ redacted, support is offered via the forums and not e-mail ]

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.