How do I make a new top level menu in Wordpress?
I want to create a new Menu in the admin panel of Wordpress for my new plugin. Just like 'Tools', 'Users', 'Settings', I want a new item, 'My Plugin'.
I'm aware of the function add_menu_page()
, but how do I use开发者_高级运维 it?
What is the code for doing this?
For how-to on add_menu_page()
follow this link. For most of the wordpress function you can use codex. Eg/
add_menu_page($page_title, $menu_title, $access_level, $file, $callback_function, $icon_url);
yes what Pragati Sureka said is true. it's the right way to do it. You just have to put it in functions.php in your theme file
精彩评论