By using Elementorforum.com’s services you agree to our Cookies Use and Data Transfer outside the EU.
We and our partners operate globally and use cookies, including for analytics, personalisation, ads and Newsletters.

  • Join the Best Wordpress and Elementor Support forum

    Provide or get advice on everything Elementor and Wordpress, ask questions, gain confirmation or just become apart of a friendly, like minded community who love Wordpress and Elementor


    Join us!

How to remove Elementor Templates Menu from Shop Manager Role

Community

Community

Administrator
Staff member
We often make it so the shop manager role in Woocommerce is specifically for managing the shop, so we remove all the other clutter and have seperate Admin accounts for people who need the more advanced settings.

More often than not, the Elementor Templates menu remains in place. The code below demonstrates how we remove certain post types, the elementor template menu and the Tools and themes menus, specficially just for the Shop manager role.

Add the following to your functions.php, or your code snippet plugin.

PHP:
function hide_menu_items_for_shop_manager(){if (is_admin() && current_user_can('shop_manager')){remove_menu_page('edit.php?post_type=listing');
        remove_menu_page('edit.php?post_type=reviews');
        remove_menu_page('edit.php?post_type=packages');
        remove_menu_page('edit.php?post_type=services');
        // Elementor Templates menu, sometimes requires removing the 'elementor_library' post type
        remove_menu_page('edit.php?post_type=elementor_library');
        remove_menu_page('tools.php');
        remove_menu_page('themes.php');
    }
}
add_action('admin_menu', 'hide_menu_items_for_shop_manager', 1000);
 
Elementor Services Elementor Services

Latest posts

Latest Resources

Other Elementor Resources

elementor official
Top