WordPress.org

Support

Support » Plugins and Hacks » WP-Polls » [Plugin: WP-Polls] How to hide "View Results" link before voting

[Plugin: WP-Polls] How to hide "View Results" link before voting

Viewing 4 replies - 1 through 4 (of 4 total)
  • ***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;
    }

    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>

    Can I hide results for all users also after voting?

    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).

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP-Polls] How to hide "View Results" link before voting’ is closed to new replies.
Skip to toolbar