Disable/hide TagDiv Composer for non-admins

Posted in: Newspaper
Post count: 36

I would like to hide the “Edit with TagDiv Composer” for any users (editors, authors e.t.c) apart from Admins.

How I can achive it?

Post count: 27744

Hello,

Only the admin and editor can edit with tagdiv Composer; if other users try to edit, the changes are not saved.

Have a great day!

Post count: 36

There is any way to hide it completly for non admins?
using CSS ? or using remove_menu()? or using remove_node()?

Post count: 27744

Hello,

You can hide the top bar using a plugin, like Jetpack, but this will be removed for all users.

Thank you!

Post count: 36

This was working before remove_menu(‘tdb_template_builder’);
What’s the correct ID of tdb_template_builder ?

Post count: 27744

Hello,

The button is not displayed if you are a contributor, author, or subscriber; only the editor and admin are displayed.

Thank you!

Post count: 36

Hello,

I understand that, but I want to remove it for editors as well.
I have many editorial sites based in your theme, so many editors has access to those sites. I don’t want them to view the composer.

Post count: 27744
Post count: 36

Anamaria the answers you are givving me has nothing to do with my question.
I don’t want to hide the admin bar!!
I only want to hide your composer button!!

Post count: 27744

Hi,

Only like this, you can hide it.

Thank you!

Post count: 36

ok I will find the solution by myself

Post count: 68

Hello Mario, Could you share the solution with us? It could help me and many other users who are looking for a way to do this!

Post count: 36

Hello, I am still working on the solution, I will post it once its ready

Post count: 1

@Anamaria, FYI


function hide_menu_and_admin_bar_items_for_editor() {
// Check if the current user is an editor
if (current_user_can('editor') && !current_user_can('administrator')) {
add_action('admin_bar_menu', function ($wp_admin_bar1) {
if ( is_admin_bar_showing() ) {
echo '<style>
#wp-admin-bar-td_live_css_css_writer, #wp-admin-bar-tdc_edit, #wp-admin-bar-tdc_page_mobile_template {
display: none !important;
}
</style>';
}
}, 9999);
}
}
add_action('init', 'hide_menu_and_admin_bar_items_for_editor');

  • This reply was modified 1 year by alek123.
  • This reply was modified 1 year by alek123.
Viewing 14 posts - 1 through 14 (of 14 total)
The forum ‘Newspaper’ is closed to new topics and replies.