• I have the bellow function in my child theme functions.php file. Because of it the plugin sometimes displays an error (only the word “error”) and stops or just stops. What can be wrong here?

    /* Redirect users from WordPress admin pages */
    /* http://msyk.es/blog/redirect-users-wordpress-admin-pages/ */
    function my_wp_admin_ban(){
    	if( is_user_logged_in() && !current_user_can('activate_plugins') ){
    		wp_redirect( get_bloginfo('wpurl') );
    		exit;
    	}
    }
    add_action('admin_init','my_wp_admin_ban');

    I tested this with all other plugins and custom functions disabled, the result is the same.

The topic ‘Redirect issue’ is closed to new replies.