Viewing 2 replies - 1 through 2 (of 2 total)
  • I am having a very similar issue.

    I am using the WP Mingle plug-in and having members register their accounts through it.

    Members registered through Mingle can not vote and after clicking the Vote button, are directed to their Mingle Activity page.

    Administrators may vote without issue though.

    Could this be a conflict between WP Mingle and WordPress Poll?

    This issue occurs even if I set the voting option to “Anyone can poll.”

    Any thoughts?

    Solved it!!!!!!!!!!!

    My issues were multiple:

    WPPoll utilizes AJAX for storing data, and as such, required access to /wp-admin/admin-ajax.php. This was disabled by selecting (checking) “Prevent Subscribers Access to the WordPress Admin” in the Mingle plug-in settings. When this was unchecked, WPPoll began functioning as expected, but this left the ability for Subscribers to get to the Dashboard.

    To override this, it is necessary to add a few lines of code to the functions.php file in your theme to allow access to admin-ajax.php, but nothing else.

    add_action( 'admin_init', 'blockusers_init' );
    function blockusers_init() {
      if (! is_super_admin() && $_SERVER['PHP_SELF'] != '/wp-admin/admin-ajax.php' ) {
        wp_redirect( home_url() ); exit;
    	}
    }

    This will cause any requests into /wp-admin/ to be redirected to the home page if the user is not logged in as an administrator.

    Note: Make sure that if your site is not in the root of your domain (e.g. https://www.somesiteurl.net/something/), you will need to add the appropriate directory(ies) to the beginning of the /wp-admin/admin-ajax.php path.

    Now the code will run and the directory is not easily accessible.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WordPress Poll] Great looking simple plugin but my votes wont register’ is closed to new replies.