• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

nSiteful Web Builders

Building a Better Web - One Site at a Time.

  • Home
  • About
    • Testimonials
    • Resources
    • Partner With Me
    • Frequently Asked Questions
  • Web Sites
  • Online Marketing
  • WordPress Support
    • Customized WordPress Training
    • 60-for-60 Sessions
  • Web Applications
  • Blog
    • At-A-Glance
    • Blog Articles Grouped by Category
    • Case Studies
    • General
    • Portfolio
    • Reviews
    • Snippets
    • Techniques
    • Projects
  • Contact
    • Purchase Retainer Consulting Hours
    • About Retainer Consulting Hours
    • Book a Meeting with Jeff
    • Tell Me About Your Web Project
    • nSiteful Newsletter Archives
    • nSiteful Rewards

By Jeff - 7/18/2023
Cats: Techniques · Tags: Custom Post Types, MemberPress, Membership Sites, SEBA, WordPress

techniques

Customize User Roles & Capabilities in WordPress: How (and Why)

Last updated December 9th, 2025 at 01:29 pm

Overview

Out of the box, WordPress offers a gatekeeping system — controlling which users can perform which actions — based on a default set of user roles and capabilities. In this article, I’ll explain the limitations of those default roles and capabilities and how you can modify them to better meet your specific needs.

Default WordPress Roles & Capabilities

Inadequate at best; dangerous at worst

The default WordPress roles — and the capabilities assigned to those roles by default — are inadequate in some situations and potentially dangerous in others. It’s not uncommon for a WordPress admin to promote a user to a role that confers more power than that user should have, just so that he or she can perform a limited set of functions not available to a lower-level role.

For example, you might want to permit a user to edit only blog posts — not pages or any other custom post types. Unfortunately, the “Editor” role, by default, permits editing both blog posts and pages — as well as some other custom post types.

Making everyone an Administrator is <understatement>not a great solution</understatement>.

Probably the most common case of giving users more power than they should have is the practice of conferring the role of “Administrator” to users who don’t need and shouldn’t have all the capabilities associated with that role.

The problem with overloading users with more power than they need isn’t so much that they’ll deliberately abuse their power and nefariously damage things, as this is a rare occurrence. Rather, the problem is that users who don’t need to be Administrators might create problems inadvertently (at worst) or be confused by the dashboard interface (at best).

Fortunately, the extensibility of WordPress allows us to customize dashboard access in such a way to give users access only to the functionality they need.

The Scenario: Allow Chapter VPs to add/edit content for their own chapters only

I’ll illustrate how to customize your WordPress website’s gatekeeping system using the example of a WordPress/MemberPress membership site I recently launched for the SouthEastern Bluegrass Association (“SEBA”).

SEBA is an all-volunteer organization dedicated to the support and promotion of bluegrass music in the southeastern United States. The organization has several geographically-based chapters, each of which holds a monthly meeting and bluegrass jam that is organized by that chapter’s volunteer leader, who is a website user with an active SEBA membership. (These chapter leaders are sometimes referred to as “Chapter VPs”, even though they’re not actual officers of the organization.)

Each chapter (which is a WordPress custom post type called “chapter” — more posts about custom post types here) has its own page on the SEBA website, and the requirement was that a chapter’s page content could be created and edited only by that chapter’s “VP”. (Of course, site Administrators would also have that capability.)

The Problem

Without modifying the WordPress default role-capability gatekeeping system, there was no way to limit chapter editing powers as needed. In the default system, an editor is an editor — without regard to the type of post. If we made a chapter leader a WordPress “Editor”, he or she could edit not only any chapter’s content but almost any content for any post type. We definitely did not want that.

The Solution

The solution consisted of 3 parts:

  1. A new role, which we called “Chapter VP”
  2. A new capability type, called “chapter”
  3. Granting specific capabilities to the “Chapter VP” role

Step 1: Create New Role

Using the Members plugin, originally developed by Justin Tadlock and currently maintained by the folks at MemberPress, I created the new role, “Chapter VP”. Doing so was as simple as selecting “Members > Roles > Add New Role” in the WordPress dashboard.

Step 2: Create New Capability Type

To create the new capability type, I edited the php code that registers the “chapter” custom post type.

When registering a custom post type, there is an optional parameter for ‘capability type’ whose default value is ‘post’ (details on the ‘capability_type’ parameter here. Setting the capability type for a custom post type to ‘post’ means that the capabilities for reading, editing, and deleting posts of that type will be the same as the capabilities for standard (blog) posts.

To create this new capability type, I simply replaced this line…

'capability_type' => 'post',

with this line…

'capability_type' => 'chapter',

For context, here’s the complete code for registering the chapter custom post type:

function nwb_register_cpt_chapters() {
	$labels = array(
		'name'                  => 'SEBA Chapters',
		'singular_name'         => 'SEBA Chapter',
		'menu_name'             => 'SEBA Chapters',
		'name_admin_bar'        => 'SEBA Chapter',
		'archives'              => 'SEBA Chapters',
		'attributes'            => 'SEBA Chapters Attributes',
		'all_items'             => 'All SEBA Chapters',
		'add_new_item'          => 'Add New SEBA Chapter',
		'add_new'               => 'Add New SEBA Chapter',
		'new_item'              => 'New SEBA Chapter',
		'edit_item'             => 'Edit SEBA Chapter',
		'update_item'           => 'Update SEBA Chapter',
		'view_item'             => 'View SEBA Chapter',
		'view_items'            => 'View SEBA Chapters',
		'search_items'          => 'Search SEBA Chapters',
		'not_found'             => 'Not found',
		'not_found_in_trash'    => 'Not found in Trash',
		'featured_image'        => 'Featured Image',
		'set_featured_image'    => 'Set featured image',
		'remove_featured_image' => 'Remove featured image',
		'use_featured_image'    => 'Use as featured image',
		'insert_into_item'      => 'Insert into SEBA Chapter',
		'uploaded_to_this_item' => 'Uploaded to this SEBA Chapter',
		'items_list'            => 'SEBA Chapters list',
		'items_list_navigation' => 'SEBA Chapters list navigation',
		'filter_items_list'     => 'Filter SEBA Chapters list',
	);
	$args = array(
		'label'                 => 'SEBA Chapter',
		'description'           => seba_chapters_blurb(),
		'labels'                => $labels,
		'supports'              => array( 'title', 'editor', 'thumbnail', 'page-attributes', 'author', 'comments' ),
		'hierarchical'          => true,
		'public'                => true,
		'show_ui'               => true,
		'show_in_menu'          => true,
		'menu_position'         => 5,
		'show_in_admin_bar'     => true,
		'show_in_nav_menus'     => true,
		'can_export'            => true,
		'has_archive'           => true,
		'exclude_from_search'   => false,
		'publicly_queryable'    => true,
		'capability_type'       => 'chapter',
		'map_meta_cap'			=> true,
	);
	register_post_type( 'chapter', $args );
}
add_action( 'init', 'nwb_register_cpt_chapters', 0 );

The result of this modification is that WordPress will generate new capabilities that can be granted or denied to specific roles. Note capabilities in this screen shot of the Members plugin user interface.

Customize User Roles & Capabilities

Step 3: Grant Capabilities

Finally, I used the Members plugin to grant capabilities to the new Chapter VP role.

Here’s the screen shot again, with callouts.

Note that while capability #1 (edit_chapters) is granted to the Chapter VP role, capability #2 (edit_others_chapters) is not. This is how we allow a Chapter VP to edit his/her chapter content but not chapter content of any other Chapter VPs.

Customize User Roles & Capabilities

Caveat

After adding a custom capability as I did in the above example, you need to grant those capabilities to the Administrator role if you want administrators to have the capability. It’s counterintuitive, if you ask me, but it’s true.

In Closing

Creating new WordPress roles and capabilities and assigning capabilities to roles can be performed with code as well as with other role management plugins. In this case, I chose to use the (free) Members plugin for our solution for these reasons:

  • I chose to use a plugin rather than code so as to make the process more accessible to WordPress admins who are not developers.
  • I’ve been using the Members plugin for years, and it integrates seamlessly with MemberPress.

I hope this article drives home how easy it is to customize WordPress user roles and capabilities — and how you can use these techniques to avoid the trap of making users who shouldn’t be administrators administrators. (And keep in mind that you can create new roles without creating new capabilities.)

If you have questions, comments, or examples of how you customized user roles and capabilities for one of your WordPress websites, please let me know in the comments below.

Like what you see? Share with others and join my mailing list. No long-term commitment, unsubscribe any time.

Related Posts

  1. How To Use MemberPress to Protect Posts that Contain Custom Fields
  2. MemberPress: How to Create a Custom MemberPress Course Progress Page
  3. Add Dynamic Table of Contents to a Series of WordPress Posts
  4. Southeastern Bluegrass Association Membership Site
  5. Use Case for Custom Post Type: “In The News”

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

mailchimp signup

Subscribe to get notified when new articles are published. Unsubscribe any time. No spam. I promise. Check out my newsletter archives.

social

Twitter Facebook LinkedIn

Recent Articles

  • Post-Specific CSS for WordPress October 5, 2026
  • You built an online course, but they haven’t come. September 16, 2026
  • Custom MemberPress Pricing Pages December 19, 2025
  • CSS Data Attribute Override December 11, 2025
  • MemberPress Rules Using Custom Taxonomies and Custom Roles December 10, 2025

Filter By Category/Tag

Categories

  • Case Studies (8)
  • For Staff (1)
  • General (73)
  • Portfolio (7)
  • Reviews (14)
  • Snippets (24)
  • Techniques (52)

Popular Tags

Advanced Custom Fields Blogging Child Themes Content Marketing CSS Customer Service Custom Fields Custom Post Types Diagnostics Domain Names Facebook FooGallery Genesis Hosting HTML Images iPhone Libra Live Chat Marketing Media MemberPress MemberPress Courses Membership Sites Mobile-Friendly MySQL Photo Gallery php Pinterest Plugins Post Formats Pricing Project Management SEBA SEO Seth Godin Shortcodes Social Networking Surveys Taxonomies Twitter Video Web design Web forms WordPress

Footer

Background

Web Sites | WordPress Support | Web Applications.

Formally trained in liberal arts and education (I have a B.A. in Government from Harvard and studied Secondary Education at Rutgers Graduate School), I have honed my skills in the communication arts and sciences as a teacher, trainer, instructional designer, writer, photographer, calligrapher, helpdesk manager, database programmer, and multimedia developer.

(I've also been a group counselor, waiter, bartender, bicycle messenger boy, computer salesman, carpenter's helper, financial analyst, and school board president.)

Tech

Systems since 1983.
Web sites since 1994.
PHP since 2001.
WordPress since 2007.

Contact

Book Meeting
770-772-5134
Email Jeff
Send Money
All Ways

Copyright 2026, nSiteful Web Builders, Inc.

Cookies Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}
https://iframe.mediadelivery.net/embed/392008/42d18bc1-2adc-4741-b733-053d08d09c32
https://vz-000c5976-3ab.b-cdn.net/42d18bc1-2adc-4741-b733-053d08d09c32/play_720p.mp4

Receive occasional emails from Jeff