Categories

  • Access & Security 95
  • Administration 171
  • Advertisement 92
  • Audio & Video 66
  • Author & Content 99
  • Comments 96
  • Communication 110
  • Communities & Forums 84
  • Development 47
  • E-Commerce 76
  • Email Management 53
  • Events & Calendars 80
  • Language 25
  • Map & Weather 44
  • Migration & Conversion 28
  • Miscellaneous 254
  • Mobile 15
  • Photos 143
  • Plugins 260
  • SEO & Site Speed 118
  • Social 186
  • Theme Enhancement 169



  • Add this plugin to a List

    You need to be logged in to add this plugin to your list.

    WP-Polls

    Add to List

    WP-Polls adds a poll to your site: a question, its answers, and a result bar that replaces the voting form once a visitor has voted, without a page reload. A poll can go in a post with a shortcode or a block, in a sidebar with the widget, or anywhere in your theme with a template tag.

    A poll can accept one answer or several, close on a date you set, and be shown as a form or as its result. The markup of every part of it is a template you can edit, and the bars are styled with CSS custom properties your theme can override.

    Donations

    I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.

    Usage

    Showing A Poll From A Theme

    <?php if ( function_exists( 'vote_poll' ) && ! in_pollarchive() ): ?>
        <li>
            <h2>Polls</h2>
            <ul>
                <li><?php get_poll();?></li>
            </ul>
            <?php display_polls_archive_link(); ?>
        </li>
    <?php endif; ?>
    
    • To show specific poll, use <?php get_poll(2); ?> where 2 is your poll id.
    • To show random poll, use <?php get_poll(-2); ?>
    • To embed a specific poll in your post, use [poll id="2"] where 2 is your poll id.
    • To embed a random poll in your post, use [poll id="-2"]
    • To embed a specific poll’s result in your post, use [poll id="2" type="result"] where 2 is your poll id.

    Showing A Poll In A Block

    Two blocks are available in the editor, under Widgets:

    • Poll — one poll, as its voting form or as its result. Set Poll ID in the sidebar, or leave it at zero for the current poll, which is what an empty [poll] does. Show chooses between the voting form and the result.
    • Polls Archive — every poll with its results, the same listing [page_polls] produces.

    Both render on the server, so the block preview in the editor is the real poll rather than an approximation, and changing a poll updates every post showing it without re-saving anything.

    The shortcodes still work and are not going anywhere. [poll], [poll=2] and [page_polls] behave exactly as they always have, and a post already containing one needs no change. The blocks call the same code the shortcodes call, so the two render identically — use whichever suits the post.

    Showing A Poll In A Widget

    1. Go to WP-Admin -> Appearance -> Widgets.
    2. Add the Polls widget to a widget area. On block themes the widget is under the Legacy Widget block, or in Appearance -> Editor if your theme has no widget areas at all.
    3. Set its title and which poll it shows, then save.
    4. Scroll down for instructions on how to create a Polls Archive.

    How To Add A Polls Archive?

    1. Go to WP-Admin -> Pages -> Add New.
    2. Type any title you like in the post’s title area.
    3. If you ARE using nice permalinks, after typing the title, WordPress will generate the permalink to the page. You will see an ‘Edit’ link just beside the permalink.
    4. Click ‘Edit’ and type in pollsarchive in the text field and click ‘Save’.
    5. Type [page_polls] in the post’s content area.
    6. Click ‘Publish’.
    • If you ARE NOT using nice permalinks, go to WP-Admin -> Polls -> Settings and fill in Poll Archive URL, under the Archive heading, with the URL of the Polls Archive page you created above.

    To Display Total Polls

    <?php if ( function_exists( 'get_pollquestions' ) ): ?>
        <?php get_pollquestions(); ?>
    <?php endif; ?> 
    

    To Display Total Poll Answers

    <?php if ( function_exists( 'get_pollanswers' ) ): ?>
        <?php get_pollanswers(); ?>
    <?php endif; ?> 
    

    To Display Total Poll Votes

    <?php if ( function_exists( 'get_pollvotes' ) ): ?>
        <?php get_pollvotes(); ?>
    <?php endif; ?> 
    

    To Display Poll Votes by ID

    <?php if ( function_exists( 'get_pollvotes_by_id' ) ): ?>
        <?php get_pollvotes_by_id($poll_id); ?>
    <?php endif; ?>
    

    To Display Total Poll Voters

    <?php if ( function_exists( 'get_pollvoters' ) ): ?>
        <?php get_pollvoters(); ?>
    <?php endif; ?> 
    

    To Display Poll Time by ID and date format

    <?php if ( function_exists( 'get_polltime' ) ): ?>
        <?php get_polltime( $poll_id, $date_format ); ?>
    <?php endif; ?>
    

    WP-CLI

    wp polls list
    wp polls list --status=open
    wp polls get 3
    wp polls open 3
    wp polls close 3
    wp polls delete 3 --yes
    
    wp polls list --status=open --format=ids | xargs -n1 wp polls close closes every open poll one at a time.
    

    REST API

    GET  /wp-json/polls/v1/poll/<id>
    GET  /wp-json/polls/v1/poll/<id>/result
    POST /wp-json/polls/v1/poll/<id>/vote
    

    Reading is public, because a poll is public. Voting takes the same poll_<id>-nonce the rendered voting form already carries, passed as a nonce parameter, and is subject to the same eligibility and repeat-vote settings as voting through the page.

    Each response carries the rendered markup as well as the numbers, because your templates decide what a poll looks like and a client that rebuilt the markup itself would ignore them.

    A refusal answers 403, not 400 — a closed poll, a vote already cast, a bad nonce, nothing selected. 400 is kept for a parameter this plugin never had a chance to look at, and a poll that does not exist is 404. So a 403 means the request was understood and the answer is no, and sending it again differently will not help.

    These routes are an addition. The admin-ajax.php polls action is unchanged and still supported.

    Translating the template

    The plugin templates can be translated via template variables.
    There are these filters for the custom template variables

    wp_polls_template_voteheader_variables
    wp_polls_template_votebody_variables
    wp_polls_template_votefooter_variables
    wp_polls_template_resultheader_variables
    wp_polls_template_resultbody_variables
    wp_polls_template_resultfooter_variables
    

    The Result Body (Voted) and Result Footer (Voted) templates are filtered by
    wp_polls_template_resultbody_variables and wp_polls_template_resultfooter_variables
    too – the variables are shared, only the markup filters are separate.

    Add filter to your theme and register custom variable where you will add your translation.
    Good practice is to name them for example with prefix STR_ in the example STR_TOTAL_VOTERS.

        /**
         * Localize wp_polls_template_resultfooter_variables.
         *
         * @param array $variables An array of template variables.
         * @return array $variables Modified template variables.
         */
        function wp_polls_template_resultfooter_variables( $variables ) {
    
            // Add strings.
            $variables['%STR_TOTAL_VOTERS%'] = __( 'Total voters', 'theme-textdomain' );
    
            return $variables;
        }
    
    // Trigger the filter
    add_filter( 'wp_polls_template_resultfooter_variables', 'wp_polls_template_resultfooter_variables' , 10, 1 );
    

    In the admin side just call the custom variable like so and the variable has been translated in the front-end.
    %STR_TOTAL_VOTERS%’

    Rate This Plugin

    Please Login to Rate this Plugin!

    Function

    Feature

    Support

    0 Votes
    Not Rated Yet

    Wordpress.org Stats

    Ratings4.2
    Votes136
    Downloads3,701,504
    Last Updated13 Days ago
    Published21 years ago

    Report Wrong Category!

    Do you think this Plugin belongs to another Category?

    What Category Should this Plugin belong to? *

    Reason *

    Create a Plugin List

    You need to be Logged in to Create a Plugin List.

    Submit A plugin

    You need to be logged in to submit a plugin.

    Help

    WPD is the unofficial online plugin directory of WordPress.

    An attempt has been made to list Only functional, active,efficient and up-to-date plugins.

    Categorized : Plugin are listed by category and subcategory based on functionality and uses. Here you can browse wordpress plugin from our neatly categorized plugin directory and sort the plugins by rating, votes, last updated and published and search plugins using tags.

    Search : Plugins can be searched by their functionality using multi-tag search and you can search plugins using their exact name although we are not ensuring Google like search accuracy.

    Create Plugin Lists : You will be able to create list of plugins and share them with Wordpress Community or you can keep them private and use them as a bookmarks.
    e.g. Plugins That I’ve Used on My Site, Best Event Management Plugins, Christmas Plugins etc.

    If you think certain awesome plugin is not in the directory then notify us through our Submit a Plugin page.

    Browsing the Plugin Directory

    Browse by Category

    In WPD, Plugins are categorized carefully. You can browse all the categories from the homepage or you can access the category lists from any page by clicking the button from the left of the website.


    Browse by Tags

    Each plugin listed in WPD is marked with useful tags. You can browse plugins by Tags from the All Tags page


    Searching in WPD

    Multi Tag Search

    You can search plugins using multiple tags. To perform a multi-tag search. Go to Homepage and then in the search field type any keywords or tags(comma separated) and then click on the search button. To search plugins from a selected category just select the category from the dropdown and type your tags.


    Searching a specific Plugin in WPD

    If you want to find a specific plugin in our directory, Go to Homepage and then select the "Search in Title" option. Then write the name of the plugin and click the search button to find the Plugin.


    Plugin Lists

    Whats a Plugin List

    Plugin Lists are user created lists of plugins. Any registered users can create Plugin Lists and share it with anyone or make it private.


    Why Create a plugin List?
    • Easy to keep track of your favourite and useful plugin.

    • Share list of plugins on blogs, social media or to a client.

    • Keep a track of what plugins you installed in which of your blogs by creating a list for each blog



    Creating a Plugin List

    To create a Plugin List, click the button from the left of the page; a popup box will appear. In the "List Name" field, put the name of the List. eg: Best Seo plugins for your site.
    In the Description field, put a few words describing the List.
    By default, lists are automatically published as public, which is visible to everyone. If you do not want others to see the List, select "Private" from the dropdown list. Then click the "Create List" button to create the list.


    Adding Plugins to your List

    To add a plugin to your List, go to a plugin page and click the "Add to List" button. A popup box will appear where you can select in which of your list you want to add this plugin. You can add a note if you want, this note will appear below the plugin in your list.
    P.S: You can only add plugins that are in our directory.

    Your Lists will appear in our "Plugin Lists" page when you set the list as "Public" and your list contains atleast 2 plugins.


    Editing your Lists

    When you are on your list page, notice there is a button on the top right corner of the page. Click it to edit the List Name and the List Description.


    Accessing All your Lists

    You can access all your Plugin lists by going to your profile and clicking the "Lists" tab.


    Removing your Lists

    You can remove your Plugin lists by going to your profile and clicking the "Lists" tab. on top right of each list click the button to remove the list completely.

    While tremendous effort has been put to keep this directory precise and complete, still errors and omissions are unavoidable and possible. We welcome any suggestions for corrections, deletions, and idea that might improve the overall experience.

    To submit a Feedback click the from the bottom right corner of the site.

    Brave Popup Builder
    Our Latest WordPress Plugin
    Create Awesome WordPress Popups with Intuitive visual Editor. Choose from hundreds of Presets. Create Beautiful Popups and convert more visitors to subscribers, clients and customers.
    This Popup was Built with this plugin.
    Marketing knowledge
    Upgrade your
    Leverage agile frameworks to provide a robust synopsis for high overviews.
    Register or log in to assess the record