Title: Separate capability
Last modified: December 21, 2021

---

# Separate capability

 *  Resolved [klishb](https://wordpress.org/support/users/klishb/)
 * (@klishb)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/separate-capability/)
 * I’m trying to better secure some sites I manage. I need staff to be able to manage
   the notification bar, but I cannot give them this capability in WordPress without
   giving them manage_options. If I give them manage_options then they have access
   to several site administration options that they do not need.
 * Can you please give your plugin its own WordPress capability?

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Support [Swathi S](https://wordpress.org/support/users/swathiswpfront/)
 * (@swathiswpfront)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/separate-capability/#post-15186768)
 * Hi [@klishb](https://wordpress.org/support/users/klishb/),
 * You can use the ‘WPFRONT_NOTIFICATION_BAR_EDIT_CAPABILITY’ constant to change
   the capability checked by the Notification Bar.
 * For more information please go through the below link
    [https://wordpress.org/support/topic/feature-request-custom-settings-page-editor-access/](https://wordpress.org/support/topic/feature-request-custom-settings-page-editor-access/)
 * Thanks!
 *  Thread Starter [klishb](https://wordpress.org/support/users/klishb/)
 * (@klishb)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/separate-capability/#post-15188250)
 * Can this be implemented as a hook or only by defining in wp-config.php?
 *  Plugin Support [Swathi S](https://wordpress.org/support/users/swathiswpfront/)
 * (@swathiswpfront)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/separate-capability/#post-15188650)
 * You can also use the ‘wpfront_notification_bar_edit_capability’ filter to set
   custom capability.
 * Thanks!
 *  Thread Starter [klishb](https://wordpress.org/support/users/klishb/)
 * (@klishb)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/separate-capability/#post-15189120)
 * So far this is not working for me. I defined it in wp-config.php in the same 
   area I have other things defined. I then added it as a custom capability using
   PublishPress Capabilities. I then granted that capability to the role for the
   user I’m testing with.
 * The end result is I don’t see the Settings menu at all and if I try to access
   the notification bar settings page I’m told access denied. Not sure what I’m 
   missing. I’ve triple checked my work. Everything looks right.
 *  Thread Starter [klishb](https://wordpress.org/support/users/klishb/)
 * (@klishb)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/separate-capability/#post-15189623)
 * It’s definitely changing it when I define it in wp-config.php because as the 
   admin I lose access. Even if I add that capability to the Administrator role 
   I still can’t access it. As soon as I remove that line from wp-config.php it 
   works again.
 *  Plugin Author [Syam Mohan](https://wordpress.org/support/users/syammohanm/)
 * (@syammohanm)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/separate-capability/#post-15189819)
 * You can define the constant anywhere, not necessarily in wp-config.
 * Please make sure that, your capability is enabled for the role, use a role editor
   plugin like “WPFront User Role Editor”.
 * Another option is to use the PRO version of this plugin, which has a predefined
   set of custom capabilities to control all functionalities. It is also integrated
   with “WPFront User Role Editor”, so that you can see the capabilities in a different
   section.
 *  Thread Starter [klishb](https://wordpress.org/support/users/klishb/)
 * (@klishb)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/separate-capability/#post-15191158)
 * As I mentioned, I tried that using the PublishPress Capabilities plugin. I also
   tried Members plugin. I don’t use “WPFront User Role Editor” on my sites, but
   it should be doing the same thing.
 *  Plugin Author [Syam Mohan](https://wordpress.org/support/users/syammohanm/)
 * (@syammohanm)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/separate-capability/#post-15196735)
 * I agree, it should be doing the same thing. Also it should be working at this
   point.
 *  Thread Starter [klishb](https://wordpress.org/support/users/klishb/)
 * (@klishb)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/separate-capability/#post-15210937)
 * Not sure what the issue was, but this fixed it for me:
 * [https://wordpress.org/support/topic/trouble-giving-custom-capability/#post-15199412](https://wordpress.org/support/topic/trouble-giving-custom-capability/#post-15199412)
 *  Plugin Support [Swathi S](https://wordpress.org/support/users/swathiswpfront/)
 * (@swathiswpfront)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/separate-capability/#post-15217096)
 * The filter is the alternate way to set custom capability.
 * Your previous code wasn’t working may be due to the invisible characters in the
   code.
    -  This reply was modified 4 years, 5 months ago by [Swathi S](https://wordpress.org/support/users/swathiswpfront/).

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Separate capability’ is closed to new replies.

 * ![](https://ps.w.org/wpfront-notification-bar/assets/icon.svg?rev=1672432)
 * [WPFront Notification Bar](https://wordpress.org/plugins/wpfront-notification-bar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpfront-notification-bar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpfront-notification-bar/)
 * [Active Topics](https://wordpress.org/support/plugin/wpfront-notification-bar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpfront-notification-bar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpfront-notification-bar/reviews/)

 * 10 replies
 * 3 participants
 * Last reply from: [Swathi S](https://wordpress.org/support/users/swathiswpfront/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/separate-capability/#post-15217096)
 * Status: resolved