Dprime Admin Bar v1.1.0

Hide the WordPress admin bar for selected user roles. Configure which roles see the toolbar from a single settings page. No code required.

Installation

  1. Download the plugin zip from my.dprime.au or the plugin page.
  2. In your WordPress admin go to Plugins > Add New > Upload Plugin.
  3. Choose the zip file and click Install Now.
  4. Activate the plugin.
  5. Go to Dprime > Admin Bar in the sidebar. If Dprime Core is not installed, look for Admin Bar as a standalone menu item.
Dprime Admin Bar does not require Dprime Core. It works as a standalone plugin.

Settings

The settings page has a single table: a list of every user role registered on your site with a checkbox next to each one.

  • Tick a role to hide the toolbar for users with that role on the front end.
  • Untick a role to show the toolbar for users with that role.
  • Administrator is listed but is always exempt. Ticking it has no effect.
  • Click Save settings to apply changes.
Custom roles added by WooCommerce, membership plugins, or other tools appear in the list automatically.

Default hidden roles

After activation the plugin pre-selects these roles as hidden:

subscriber contributor customer

These are the roles least likely to need the WordPress toolbar. Change them at any time on the settings page.

Frequently asked questions

Does hiding the toolbar affect any permissions?

No. The plugin only controls what is visible on the front end. User permissions, wp-admin access, and account pages are unchanged. Users can still log in and visit their account.

Can I combine this with Dprime Admin?

Yes. Dprime Admin controls the appearance of wp-admin. Admin Bar controls the front-end toolbar visibility. They work independently and are often installed together.

What if a user has multiple roles?

If any of the user's roles is set to hidden, the toolbar is hidden for them.

Will settings be lost on update?

No. The option key dpab_settings is preserved across updates.

How do I remove the plugin?

Deactivate and delete the plugin from the Plugins screen. The plugin removes the dpab_settings option from the database automatically on deletion.

Override classes

Every element on the settings page has a named CSS class for custom styling.

/* Settings page */
.dpab-page           /* Outer page wrapper */
.dpab-section        /* Role list card */
.dpab-section-head   /* Section title and description */
.dpab-roles          /* List of role rows */
.dpab-role-row       /* Single role row */
.dpab-role-label     /* Role display name */
.dpab-role-slug      /* Role slug shown in grey */
.dpab-notice         /* Success or error notice */
.dpab-notice-ok      /* Success state modifier */
.dpab-save-btn       /* Save settings button */
.dpab-tabs           /* Tab navigation bar */
.dpab-tab            /* Individual tab link */
.dpab-tab.active     /* Active tab */
.dpab-help           /* Help tab outer wrapper */
.dpab-help-section   /* Individual help card */