I want to add a menu to the wordpress admin with an ID, that is, without a link. I want to add it to activate a modal/popup that I will add. I can place a floating button, but I want to have it all more organized.
Here’s how to create the menu: https://developer.wordpress.org/reference/functions/add_menu_page/
What I don’t know is how to make it just have an icon, name, and ID, with no redirect link.
3
Answers
You can hook into the global $menu like so
Just make sure that there $menu[20] doesn’t exist or it will overwrite it.
Check this out buddy 🙂
Another simpler solution can be: