Hide the Edit With Elementor Button for User Roles

If you are using Elementor, there will be an “Edit With Elementor” button on your post editing screen. This allows users to edit the post with the Elementor editor rather than the normal WordPress editor. This button is usually placed in the top left corner of the block editor. 

One of our users wanted to hide this button for specific users.

Thanks to the PublishPress Capabilities plugin, it is possible to hide the Elementor button only for a specific user role.

PublishPress Capabilities can hide any element in the WordPress editor. We're going to use that feature to answer our customer's question. This screenshot below shows the “Edit with Elementor” button.


How to Hide the Elementor Button for A User Role

You will need the Pro version of PublishPress Capabilities in order to complete this task.

  • Go to Capabilities > Editor Features.
  • Select your role in the top left corner.
  • Select your post type in the left sidebar.
  • Scroll to the very bottom and add this div#elementor-switch-mode
  • Click “Add”. You will see the message “New custom item added”.
  • Click “Save Post Restrictions”.

Congratulations. You've now finished the task. This is what it looks the post editing screen looks like after we hide the button:


More Plugin Possibilities With PublishPress Capabilities

The PublishPress Capabilities plugin allows you to create unique roles for many kinds of plugins. For example, you can hide the Refund button in WooCommerce for some users. Or you can restrict the LearnDash menu for specific users. If your plugin doesn't provide the access controls you need, you can probably make it happen with PublishPress Capabilities.

  • Riza Maulana Ardiyanto

    Riza Maulana Ardiyanto, based in Kudus, Indonesia, is a dedicated support specialist at PublishPress. Outside of work, he’s an enthusiastic mobile gamer, always eager to explore new gaming experiences and challenges.

    View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *