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?

Related posts

Leave a Reply

2 comments