Support » Plugin: YOP Poll » Displaying nicknames of voters in results

  • merkaba5


    Hi! Thanks for a great plugin!

    Prompt, how to make the list of nicknames of registered users answered each question displaying in the poll results?

    Something like this:

    Answer 1 – 60% ( 6 votes )
    User1, User2, User3, User4, User5, User6
    result bar

    Answer 2 – 40% ( 4 votes )
    User7, User8, User9, User10
    result bar

    Poll open only for registered users.

    Sorry for my bad english & thanks!

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


    Hi merkaba5,

    Edit inc/yop_poll_model.php and in answer_result_replace_callback function, approximately on line 3268 you will see

    if ( 'yes' == $poll_options['poll_answer_html_tags'] ){
                                $temp_string = str_ireplace( '%POLL-ANSWER-LABEL%', yop_poll_kses( stripslashes( $answer['answer'] ) ), $temp_string );
                            else {
                                $temp_string = str_ireplace( '%POLL-ANSWER-LABEL%', yop_poll_kses( esc_html( stripslashes( $answer['answer'] ) ) ), $temp_string );

    Before if ( ‘yes’ == $poll_options… , from logs table ( $wpdb->yop_poll_logs ) you can select the user_ids of those who voted based on the poll_id and $answer[‘id’] that you’ll find in the logs table

    Also, using those user_ids you can extract the usernames from


    YOP Team

Viewing 1 replies (of 1 total)
  • The topic ‘Displaying nicknames of voters in results’ is closed to new replies.