Forums

Making Admin menu show (1 post)

  1. thadfiebich
    Member
    Posted 1 year ago #

    I created a plugin that puts a button in the dashboard. Right now I have it as a top level menu.

    I am trying to figure out the best way to do this. I want myself (admin), and a few select others (not admins) to access this menu to do stuff.

    Is the best way to setup roles, conditional statements based on usernames, ect?

    Im cool with doing this as a submenu, but need others aside from myself to be able to see it.

    Here is my current code. I hope what i am asking is clear..

    `function ami_admin() {
    include('comm_profile_admin.php');
    }

    function ami_admin_actions() {
    /*add_options_page('Community profile Manager', 'Community Profile Manager', 'manage_options', 'CommunityProfileManager', 'ami_admin');*/
    add_menu_page('Page title', 'Top-level menu title', 'manage_options', 'my-top-level-handle', 'ami_admin');
    }

    add_action('admin_menu', 'ami_admin_actions');

Topic Closed

This topic has been closed to new replies.

About this Topic