Guest User

Untitled

a guest
Aug 2nd, 2023
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. // Add this code to your theme's functions.php file or a custom plugin file
  2. function remove_cloud_templates_for_non_admin() {
  3. if (!current_user_can('administrator')) {
  4. // remove_menu_page('tdb_cloud_templates'); // if is not working then use the css option
  5. echo '<style> #toplevel_page_tdb_cloud_templates{ display: none !important; }</style>';
  6.  
  7. }
  8. }
  9. add_action('admin_menu', 'remove_cloud_templates_for_non_admin');
Advertisement
Add Comment
Please, Sign In to add comment