# "Edit with Elementor" in the Admin Bar for Administrators Only

> Hides the "Edit with Elementor" menu in the admin bar from everyone except administrators, so editors and shop managers are not tempted to change designed layouts.

- Type: PHP
- Runs: Run everywhere
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: elementor, admin-bar, roles
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/elementor-admin-bar-link-for-admins/

## Code

```php
// Who keeps the admin bar link.
$wpide_el_bar_capability = 'manage_options';

add_action( 'admin_bar_menu', function ( $wp_admin_bar ) use ( $wpide_el_bar_capability ) {
    if ( current_user_can( $wpide_el_bar_capability ) ) {
        return;
    }

    $wp_admin_bar->remove_node( 'elementor_edit_page' );
}, 999 );
```

## Notes

Change manage_options to another capability to keep the link for more roles.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find ""Edit with Elementor" in the Admin Bar for Administrators Only" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
