hide "cloud templates" from menu on Editor role

Posted in: Newspaper
Post count: 15

Hello I wanted to hide the menu item “cloud templates” when an Editor logs in. Any ideas?

Thank you.

Post count: 20688

Hi,

You could do that if it’s required. A code like this entered in the theme or child theme functions file should remove the cloud templates menu from the dashboard

add_action( 'admin_init', 'remove_menu_pages' );
function remove_menu_pages() {
if ( current_user_can( 'editor' ) ) {
remove_menu_page( 'edit.php?post_type=tdb_templates' );
}
}

Thanks

Post count: 2

Hi,
i am using newspaper 10.3. Is this code still applicable?
and where is the functions file location that i can enter this code?

Thanks

Post count: 35449

Hi,

Yes, the code should still work, you need to set it in the functions.php this is the path -> wp-content/plugins/td-composer/legacy/Newspaper/functions.php

Thank you!

Post count: 2

Hi Calin,

it works.

Thanks!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.