php - Wordpress: Disable Backend -
i'm running simple wordpress membership website, have installed own membership plugin , custom login page, i'm unable remove horrible wp toolbar (also disabling option in user profile doesn't work, bar still there) want totally strip backend user (subscribers only) , not allow access profile page, dashboar , whatsoever backend element, don't need know user live, website , stuff that.
you can place in theme's functions.php
example.
//disable black bar. still visible in wp-admin if (current_user_can('subscriber')) { show_admin_bar(false); } //redirect wp-admin add_action('admin_init', 'my_admin_redirect'); function my_admin_redirect() { if (!defined('doing_ajax')) { if (current_user_can('subscriber')) { $refer=wp_get_referer(); if (!$refer || strpos($refer, 'wp-admin')) { wp_safe_redirect(home_url()); } else { wp_safe_redirect($refer); } } } }
Thanks for give us valuable information
ReplyDeleteContact WordPress Support
WordPress Support Service
Very Helpful. Thanks for such Information
ReplyDeleteWP Help
24x7 WP Support