Creating admin menu item without page
-
I am writing a plugin in which the plugins menu item opens a modal, not a page. I have used the following to add the actual admin menu item
function add_modal_trigger_to_menu() { add_menu_page( 'ModalTrigger', 'ModalTrigger', 'manage_options', 'modal' ); }add_action( 'admin_menu', 'add_modal_trigger_to_menu' );
And I’ve added my html, css and js separately. Everything is working and the modal opens but of course the user is redirected to a blank page at admin.php?page=modal
How can I stop this?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Creating admin menu item without page’ is closed to new replies.