WordPress.org

Ready to get started?Download WordPress

Forums

WP-Polls
How to hide "View Results" link before voting (5 posts)

  1. jlnelson19
    Member
    Posted 2 years ago #

    How can I hide this? I don't want people to be able to view the results before voting. I tried commenting it out in wp_polls.php but it has no affect. Thanks.

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

  2. greenrachel
    Member
    Posted 2 years ago #

    ***This is a hack method, but it does work***

    I added the following code to my style.css file. You could probably also add it to the polls-css.css file within the WP-Polls plugin.

    div.wp-polls-ans p a {
    display: none;
    }

  3. greenrachel
    Member
    Posted 2 years ago #

    Found a better solution. From the Admin Dashboard click on "Polls" in the left sidebar menu, and then click on "Poll Templates" in the sub-navigation menu that drops down. Scroll down to the editing area labeled "Voting Form Footer:" and remove the following line from the code:

    <p style="text-align: center;"><a href="#ViewPollResults" onclick="poll_result(%POLL_ID%); return false;" title="View Results Of This Poll">View Results</a></p>

  4. Girovago
    Member
    Posted 2 years ago #

    Can I hide results for all users also after voting?

  5. TrueFlyingCow
    Member
    Posted 2 years ago #

    In that same section of the admin area, you can find the poll template for results (there are 2 - one if the person already voted, 1 if they didn't), and you can delete the stuff that's there. You could try to add a "Thanks for voting" line, but it gets repeated for however many options you have.

    Then if you want to display the results of these polls later, you can restore the default template (although that'll affect all of your polls).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags