Add admin menu and submenu page


add_action('admin_menu', 'my_menu_pages');
function my_menu_pages(){
add_menu_page('None Members', 'None Members', 'manage_options', 'none-member', 'my_menu_output' );
add_submenu_page('none-member', 'Send bulk email', 'Send bulk email', 'manage_options', 'none-member' );
add_submenu_page('none-member', 'Members list', 'Members list', 'manage_options', 'my-menu2', 'memberslist' );
}
function my_menu_output(){
echo "<h2>Send Bulk Email</h2>";
}
function memberslist(){
echo "<h2>All Non members User</h2>";
}

Refrence:

http://wordpress.stackexchange.com/questions/66498/add-menu-page-with-different-name-for-first-submenu-item

Advertisements

Tagged: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: