# Branding - apply remove & disable to user roles/specific users

**URL:** <https://community.mainwp.com/t/branding-apply-remove-disable-to-user-roles-specific-users/786>\
**Category:** Support\
**Tags:** disable-branding, branding, reset-branding\
**Created:** [March 2, 2020, 2:06pm UTC](https://community.mainwp.com/t/branding-apply-remove-disable-to-user-roles-specific-users/786 "2020-03-02T14:06:17Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![support27](https://community.mainwp.com/user_avatar/community.mainwp.com/support27/32/2396_2.png) [@support27](https://community.mainwp.com/u/support27)\
**Post date:** [March 2, 2020, 2:06pm UTC](https://community.mainwp.com/t/branding-apply-remove-disable-to-user-roles-specific-users/786/1 "2020-03-02T14:06:17Z")

</div>

is there a way to specify for which user roles remove and disable options can be applied. i have it locked down but when i log in as an admin i keep trying to hit the plugin if i need to make an edit. that doesn’t work and i have to modify the plugin locally then delete and update the new version through mainWP which is somewhat of a pain. other alternative is to keep turning the settings on/of when i want to work on a site for a little while.

---

<div class="post-metadata">

**Author:** ![bogdan](https://community.mainwp.com/user_avatar/community.mainwp.com/bogdan/32/11_2.png) [@bogdan](https://community.mainwp.com/u/bogdan)\
**Post date:** [March 2, 2020, 5:26pm UTC](https://community.mainwp.com/t/branding-apply-remove-disable-to-user-roles-specific-users/786/2 "2020-03-02T17:26:50Z")

</div>

Hi @support27, can you [see here](https://newcom.mainwp.com/t/remove-custom-branding-for-a-specific-user-on-child-sites/46) and let me know if that is what you are looking for?

---

<div class="post-metadata">

**Author:** ![support27](https://community.mainwp.com/user_avatar/community.mainwp.com/support27/32/2396_2.png) [@support27](https://community.mainwp.com/u/support27)\
**Post date:** [March 2, 2020, 6:00pm UTC](https://community.mainwp.com/t/branding-apply-remove-disable-to-user-roles-specific-users/786/3 "2020-03-02T18:00:38Z")

</div>

awesome… is there a snippet for user roles? that’s what I’d be mostly interested… so it applies to all user roles BUT admin

---

<div class="post-metadata">

**Author:** ![support27](https://community.mainwp.com/user_avatar/community.mainwp.com/support27/32/2396_2.png) [@support27](https://community.mainwp.com/u/support27)\
**Post date:** [March 2, 2020, 6:05pm UTC](https://community.mainwp.com/t/branding-apply-remove-disable-to-user-roles-specific-users/786/4 "2020-03-02T18:05:46Z")

</div>

Or let’s say different user roles. admin, editor, etc

---

<div class="post-metadata">

**Author:** ![bogdan](https://community.mainwp.com/user_avatar/community.mainwp.com/bogdan/32/11_2.png) [@bogdan](https://community.mainwp.com/u/bogdan)\
**Post date:** [March 2, 2020, 6:08pm UTC](https://community.mainwp.com/t/branding-apply-remove-disable-to-user-roles-specific-users/786/5 "2020-03-02T18:08:37Z")

</div>

Can you try with this:

```auto
add_filter( 'mainwp_child_branding_init_options', 'mycustom_mainwp_child_branding_init_options' ); 
function mycustom_mainwp_child_branding_init_options( $option ) {        
      if ( current_user_can( 'manage_options' ) && is_array( $option ) && isset( $option['cancelled_branding'] ) ) {        
          $option['cancelled_branding'] = true;    
     }       
     return $option; 
}

```

---

<div class="post-metadata">

**Author:** ![support27](https://community.mainwp.com/user_avatar/community.mainwp.com/support27/32/2396_2.png) [@support27](https://community.mainwp.com/u/support27)\
**Post date:** [March 2, 2020, 6:10pm UTC](https://community.mainwp.com/t/branding-apply-remove-disable-to-user-roles-specific-users/786/6 "2020-03-02T18:10:31Z")

</div>

so how would i define particular user roles? this seems to be tied to actual permissions rather than user roles

---

<div class="post-metadata">

**Author:** ![bogdan](https://community.mainwp.com/user_avatar/community.mainwp.com/bogdan/32/11_2.png) [@bogdan](https://community.mainwp.com/u/bogdan)\
**Post date:** [March 2, 2020, 6:37pm UTC](https://community.mainwp.com/t/branding-apply-remove-disable-to-user-roles-specific-users/786/7 "2020-03-02T18:37:38Z")

</div>

This specific snippet with `current_user_can( 'manage_options' )` targets administrator role. Only an Administrator can manage options. With this snippet only administrator users won’t see custom bradning.

Maybe it’s easier to use `current_user_can( 'administrator' )` or `current_user_can( 'editor' )` or `current_user_can( 'author' )`

---

<div class="post-metadata">

**Author:** ![system](https://community.mainwp.com/uploads/default/original/2X/4/4cfc87ac67e4ebdbfa0bbf0b19c8657f35a29a5b.png) [@system](https://community.mainwp.com/u/system)\
**Post date:** [March 6, 2020, 5:13pm UTC](https://community.mainwp.com/t/branding-apply-remove-disable-to-user-roles-specific-users/786/9 "2020-03-06T17:13:21Z")

</div>

Closed on March 6, 2020, 5:13pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
