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

    (@t-p)

    WordPress documentation has Plugin Handbook and https://developer.www.ads-software.com/plugins/wordpress-org/plugin-developer-faq/

    Try reviewing above info and and hope it points in the right direction.

    Thread Starter mabufoysal

    (@mabufoysal)

    Thanks @t-p . My code is like below.

    
    

    public function admin_menu()
    {
    add_menu_page(‘News Information’, ‘News Info’, ‘manage_options’, ‘news_info’, [$this, ‘api_key_page’], ‘dashicons-info-outline’, 30);
    add_submenu_page(‘news_info’, ‘News Information’, ‘API Key’, ‘manage_options’, ‘news_info_page’, [$this, ‘api_key_page’]);
    add_submenu_page(‘news_info’, ‘News Information’, ‘News’, ‘manage_options’, ‘edit.php?post_type=news’);
    remove_submenu_page(‘news_info’, ‘news_info’);
    }`
    `

    I am getting output like below.

    https://youtu.be/NUM3GuLU_F0

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sub Menu is not kept open’ is closed to new replies.