Support » Developing with WordPress » add_menu_page Capability Not Working

  • Resolved Jack Reacher



    I am creating a plugin and I want to allow the Editors to access the plugin menu page. I set the capability to publish_pages but its not working. The option page is showing to admin user but not editor user. What have I done wrong?

    function twsa_register_menu() {
            __('Agents Stats', 'textdomain'),
            __('Agents Stats', 'textdomain'),
    // create custom plugin settings menu
    add_action('admin_menu', 'twsa_register_menu');
Viewing 1 replies (of 1 total)
  • Moderator bcworkz


    Since this topic is marked as resolved, I’m assuming you found the problem, since there’s nothing wrong with the code you posted. I’m mainly replying just so resolved 1 post topics like this fall off of the “No Replies” list. If the resolved status is in error, go ahead and reply here.

Viewing 1 replies (of 1 total)
  • The topic ‘add_menu_page Capability Not Working’ is closed to new replies.