Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Add this code to your theme's functions.php file or a custom plugin file
- function remove_cloud_templates_for_non_admin() {
- if (!current_user_can('administrator')) {
- // remove_menu_page('tdb_cloud_templates'); // if is not working then use the css option
- echo '<style> #toplevel_page_tdb_cloud_templates{ display: none !important; }</style>';
- }
- }
- add_action('admin_menu', 'remove_cloud_templates_for_non_admin');
Advertisement
Add Comment
Please, Sign In to add comment