• Hi there

    i was developing a plugin and want to know how i can add menus to users (non-admins) dashboard at the left side. can you please help?

    thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    You add links to the left side menu with add_menu_page() and/or add_submenu_page(). One of the parameters is $capability. If you specify the ‘read’ capability, the menu link will be displayed to any logged in user. (It is possible for a user to not have this capability, but it would be quite illogical)

    Note that this simply controls the visibility of the link. The target page must again check capability to ensure the user did not request the page using an URL hack. You can also use capability on the page to control who sees what. Such as all users can see a data item, but only admin users will see the associated link to delete the item.

    Thread Starter Habtamu Soressa

    (@ufancha)

    thank you @bcworkz, that answers my question.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘creating dashboard menu for non-admin users’ is closed to new replies.