# Hide Bricks Templates From Non-Administrators

> Removes the Bricks Templates menu for everyone except administrators, protecting headers, footers and popups built as Bricks templates.

- Type: PHP
- Runs: Admin only
- Category: [Page Builders & Themes](https://wpide.com/library/category/page-builders/)
- Tags: bricks, templates, roles
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/bricks-templates-admins-only/

## Code

```php
add_action( 'admin_menu', function () {
    if ( ! current_user_can( 'manage_options' ) ) {
        remove_submenu_page( 'bricks', 'edit.php?post_type=bricks_template' );
        remove_menu_page( 'edit.php?post_type=bricks_template' );
    }
}, 999 );
```

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Hide Bricks Templates From Non-Administrators" 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/
