WP Block Admin
Great - solves conflict between front-end ajax and backend-access (1 post)

  1. tzeldin88
    Posted 2 years ago #

    This plugin is GREAT, and solved a big problem for me.

    My site uses bbPress, a forum plugin that uses AJAX for the links that let a logged-in forum user to Favorite or Subscribe To a topic. But of course I don't want these forum users to see my wp-admin backend. So I tried a simple hook in my functions.php:

    if ( is_admin() && ! current_user_can( 'administrator' ) ) {
            wp_redirect( home_url() ); exit;

    But this breaks the AJAX links because they actually point to a core file: wp-admin/admin-ajax.php. So either my forum ajax links are broken, or my forum users can see my wp backend.

    This plugin solves the problem, by testing for a certain Capability (which you can specify).

    Excellent plugin. Thank you!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Block Admin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.