WordPress user dashboard custom left menu example code help needed

I need help to show the left menu item on other role users dashboard. I am using the code at plugin to add the custom admin menu items .

add_action('admin_menu', 'wp_hotlel_admin_menu');
  function wp_hotlel_admin_menu() {

  add_menu_page('Page Title', 'Menu Title', 10,'unique-slug','ChainForm_page');  

  function ChainForm_page() {
  echo "test";
  } 

The menu is being displayed and working at admin dashboard. But not being displayed at other users dashboard. I am being logged in through WordPress basic users login section.

Read More

I have added the line below,

global $wp_roles;

   $wp_roles->add_cap('Subscriber','wp-wall');

Subscriber is my user type. The menu item is not being displayed still at general users custom menu.

Please help me to fix this.

Thanks in advance.

Related posts

Leave a Reply

2 comments