The Stack Overflow podcast is back! Listen to an interview with our new CEO.
1

The item you want to remove is a "node". When you look at the generated HTML of the WP toolbar, the ID of the list item () contains the node. So in this case, for the "Add New" toolbar item, you'll see the following in the HTML: <li id="wp-admin-bar-new-content" class="menupop"> Everything after "wp-admin-bar-" in the ID is the name of the node. ...


1

All users with author and contributor roles - actualy any in-built role above subscriber - should be available from the author dropdown. However, if you want organization_administrator users to be available also, you will need to assign those users a contibrutor or author role as well (anything more than subscriber.) This seems to be due to a throwback from ...


1

You should be able to use roles to accomplish this. Check this tutorial here: https://3.7designs.co/blog/2014/08/restricting-access-to-custom-post-types-using-roles-in-wordpress/ I would have just put this as a comment but I guess I have to have more reputation on this site.


1

I gave it a test run. First, I added a custom capability to a specific user, using following code $user = new WP_User( $user_id ); $user->add_cap( 'team_member' ); Luckily, this user can be retrieved using below code, as you suggested $args = array( 'role' => 'team_member' ); get_users( $args ); Which implicitly work like below $args = ...


Only top voted, non community-wiki answers of a minimum length are eligible