Add custom menu item for WP subscribers panel

if (is_admin())
{
    add_action('admin_menu', 'my_menu');
}

function my_menu()
{
    add_menu_page('My Page Title', 'My Menu Title', 'subscriber', 'my-page-slug', 'my_function');
}

function my_function()
{
    echo 'Hello world!';
}

Author: Tahir Yasin

Tahir is a Passionate Web Developer from Lahore, Pakistan and a guy with NEVER-STOP-LEARNING attitude who keeps an eye on emerging technologies and customer trends.

Leave a Reply

Your email address will not be published. Required fields are marked *