can this work
add_action( 'admin_menu', function () {
if ( current_user_can( 'editor' ) ) {
// Replace 'tdb_templates' with the actual menu slug for Cloud Templates
remove_menu_page( 'tdb_templates' );
// If it is a submenu under Newspaper / Website Manager, use remove_submenu_page instead:
// remove_submenu_page( 'td_theme_panel', 'tdb_templates' );
}
}, 999 );
Hi,
Please check the solution from this topic – https://forum.tagdiv.com/topic/remove-access-to-tagdiv-templates-and-other-cpts/
I hope this will help you!
Hi,
You can try the code from here: https://pastebin.com/UapDg6P0. This code is improved. It should be set inside the child theme in functions.php
Hi,
The code above was created specifically for the functions.php file of a child theme. I cannot guarantee that it will work exactly the same way when used as a code snippet it may work as is, but some adjustments could be required.
Even though this may not be the exact solution you requested, I made an effort to find a reliable alternative. While this falls outside the scope of the theme’s official support, I provided the most dependable option that can be reused by anyone through a child theme. I hope this proves helpful.
