Add Menu
-
I am learning WordPress Plugin Development. I would like to add a Menu in Admin Panel to insert new
News
item. How can I do that ? 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'], 0 ); add_submenu_page( 'news_info', 'News Information', 'Add News', 'manage_options', 'news_info', 'dsfdasfasf', 1 ); }
Viewing 14 replies - 1 through 14 (of 14 total)
Viewing 14 replies - 1 through 14 (of 14 total)
- The topic ‘Add Menu’ is closed to new replies.