Site icon ROVINDO

Sembunyikan menu di wordpress Backend admin

fungsi menyembunyikan hide menu admin /backend kususnya penulis/author :

function hide_custom_post_type_for_authors() {
if (current_user_can(‘author’)) {
// Replace ‘dfads’ with the slug of your custom post type
remove_menu_page(‘edit.php?post_type=dfads’);
}
}
add_action(‘admin_menu’, ‘hide_custom_post_type_for_authors’, 100);

Exit mobile version