Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8579829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:41:41+00:00 2026-06-11T20:41:41+00:00

I have spent hours looking for a way to make a custom admin menu

  • 0

I have spent hours looking for a way to make a custom admin menu visable to admins and a custom user role I made called moderators. The menu only appears for admins and not the moderators. How can I make it display for both user types?

functions.php

add_role( 'moderator', 'Moderator', array(
        'read' => true,
        'add_users'
    ));

    add_action('admin_menu', 'staff_menu');

    function staff_menu() {
       add_menu_page('Staff Menu: Options', 'Staff Menu', 'add_users', 'staff', 'staff_page', "favicon.ico", 3);
    }

    function staff_page(){
       echo "Staff Page Test will have options here";
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:41:42+00:00Added an answer on June 11, 2026 at 8:41 pm

    You forgot to give the add_users a value of true. The docs for add_user show that you need to pass a value, probably a boolean.

    add_role( 'moderator', 'Moderator', array(
            'read' => true,
            'add_users' => true
        ));
    

    Update: Check to see if the admin role still has the add_users capability.

    $admin_role = get_role('admin');
    var_dump($admin_role->has_cap('add_users'));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a really frustrating error that I've spent hours looking at and cannot
To begin, Ive spent several hours looking for an answer and have come CLOSE
This might be a stupid question but I have spent 2 hours looking for
I'm feeling frustrated. I have spent hours looking for a good piece of code
I have spent the last couple of hours looking through other questions on this
I have spent many hours looking into this and I still can't find a
I have spent some hours looking for a Rails3 dojo-toolkit UJS-driver but I had
I have spent the last several hours scouring the internet looking for examples and
Hi am new to android and have spent over 10 hours looking for this
Have a really basic question about rails - spent hours looking on the internet

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.