Support » Themes and Templates » Plugin menu page manage user roles

  • Hi,

    I’m building a page in the admin menu.
    Like a plugin.
    I want this page available for everybody regardless of the role the user has.
    How can I do this?

    I create the page by doing this:

    add_action( 'admin_menu', 'my_own_menu' );
    function my_own_menu() {
    	add_menu_page( 'my_own_menu', 'my_own_menu', 'manage_options', 'my_own_menu', 'my_own_options', $icon_url, $position );
    function my_own_options() {
    	if ( !current_user_can( 'manage_options' ) )  {
    		wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
    	echo '<div class="wrap">';
    	echo '<p>Let\'s Build</p>';
    	echo '</div>';

    I’ve tried different approaches but nothing seems to work.

  • The topic ‘Plugin menu page manage user roles’ is closed to new replies.