Hi, I’d like to hide Conerstone entirely from the WP dashboard based on user roles.
I’ve read this post: How to allow or deny Cornerstone permissions based on roles?
But I can’t seem to find “Content Roles” anywhere.
I’m using Pro.
Hi, I’d like to hide Conerstone entirely from the WP dashboard based on user roles.
I’ve read this post: How to allow or deny Cornerstone permissions based on roles?
But I can’t seem to find “Content Roles” anywhere.
I’m using Pro.
Hello Amadeo,
Thanks for writing in! Please go to Cornerstone > Settings > Permission and disable the features that you do not want the users to have access to. Perhaps this documentation can help you:
Best Regards.
Hi, thank you for the response. I’ve already disabled everything for that role but the Cornerstone menu still exist on the admin dashboard. I’d like to remove the menu item altogether.
In the end, I added this on the child’s theme functions.php
add_action( 'admin_init', 'remove_menu_pages_for_all_except_admin' );
function remove_menu_pages_for_all_except_admin() {
global $user_ID;
if ( !current_user_can('administrator') ) {
remove_menu_page('cornerstone-settings');
}
}
But that doesn’t remove the menu from the admin bar. So I added a new code:
function wps_admin_bar() {
global $wp_admin_bar;
if ( !current_user_can('administrator') ) {
$wp_admin_bar->remove_node('tco-main');
}
}
add_action( 'wp_before_admin_bar_render', 'wps_admin_bar' );
These two codes together achieved the results that I wanted. I was wondering id there’s no theme options that would make this possible?
Hello Amadeo,
We do not have such settings. What we have at the moment is the Permission settings for the different USER roles. As long as you have disabled all the features to the user, it will not display the Cornerstone or any theme related features and functions.
Cornerstone > Settings > Permissions > Editor
What the user with the “Editor” role see in the WP Admin:
Hope this helps.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.