Support » Plugin: WP Block Admin » Great – solves conflict between front-end ajax and backend-access

  • 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!

  • The topic ‘Great – solves conflict between front-end ajax and backend-access’ is closed to new replies.