Try something like this: in the load hook, you can ouput your xml code.
u
function my_menu_pages() {
$hook = add_submenu_page(
null, 'Page Title', 'Page Title', 'administrator', 'sub-menu-slug', function() {
}
);
add_action('load-' . $hook, function() {
// add your xml code here,
// you will get a blank page to start with
exit;
});
}
add_action('admin_menu', 'my_menu_pages');
Related Posts:
- Add an admin page, but don’t show it on the admin menu
- How to change menu page capability
- Wrong current class on admin menu with add_submenu_page()
- Role capability issue
- Adding a submenu to the Tools menu returns tools.php in a popup box
- Create dynamic wordrpess blank page
- What’s the correct way of moving a menu page to a submenu
- Visiting a console submenu page does not expand its parent menu item
- WordPress add page under admin submenu and retaining the active status of the parent submenu page in the menu
- add submenu page doesn’t display
- How to have submenus collapsed until they are clicked?
- How to check an admin submenu already exists?
- WordPress admin menu formatting issue
- Remove duplicate main – submenu in admin?
- Plugin View Details Link
- Getting custom admin submenu item to highlight when its active
- Add update notification bubble to admin menu item?
- remove_menu_page doesn’t work on custom plugin menus
- Add visit site to your toolbar instead of being in the dropdown
- List table not rendering when $this->items is filled
- Order Admin sub-menu items?
- Admin sidebar items overlapping in admin panel
- How Can I remove or hide the export page in WordPress menu?
- How to hide menu on WordPress admin
- custom admin menu with custom filed
- Theme editor menu item refuses to go away
- Highlighting a Menu Item by Post Name
- How to remove the Plugins Editor from the admin menu
- Admin custom option screen not saved unless user manage_options capability
- WordPress admin menu formatting issue
- How to remove_menu_page added by a plugin that appears to have no referenceable slug
- Admin page menu keeps bugging out
- WordPress setting API strucked
- Show admin menu and toolbar in admin post page
- Edit Page or Post from Top Admin Bar
- How to minimize WP dashboard menu programmatically?
- WordPress add_options_page() function not considering role
- add_submenu_page set for multiple roles [duplicate]
- Link to Second Level Admin Page
- check current_theme_supports in admin_menu hook
- How to change page via login as user and admin
- Is there any way to add absolute path for add_menu_page function?
- how can i add custom menu in admin panel?
- Admin page repeatable fields
- Hiding Admin Page While Keeping Menu Expanded
- menu_order not working with slugs that start with admin.php
- How do I demote a menu item in the admin menu?
- Removing posts and comments from WordPress
- Admin Panel – Custom Menu Sub-Item LINK
- Is there a limit to the number of items that can be added using the Appearance Menus Screen?
- Insert & order custom post types in/as submenu
- Sub Menu content is being duplicated
- How to access $menu variable in custom .PHP file that loads wp-load.php?
- WordPress admin menu formatting issue
- How to use add_submenu_page() for editors?
- Is it possible to add 3 level menu item to admin menu?
- toolbar not visible on pages using front-page template
- How to align the top of an admin pointer to the target element?
- WP components no style
- Adding menu item to WordPress admin bar for editors to edit one plugin’s settings
- Remove Elementor Menu From WordPress Admin
- Moving Smush plugin menu position to media submenu and removing it from main menu
- WordPress plugins add parent menu option in admin main right
- update_option does not work in this scenario – how do I fix?
- Change menu order of core post-type in UI?
- How to reference an existing css content-based icon, within my admin menu hook
- Margin problem on management menu?
- How can I move Customizer menu item to first level in WP Dashboard?
- How do I disable certain menu in editor user administrator page
- Show limited menu to admin
- How would one add a nonce to a menu item in the WordPress dashboard?
- How can I change the admin menu title and url title on WordPress
- Different Admin language
- add sub_menu to a sub_menu (multiLevel sub_menu) in admin menu in wordpress
- add_menu_page not show link for custom role
- Linked pages not working with wordpress
- Hide admin menu items if it is empty
- Admin menu hilighting wrong item for CPT
- Insert link in sub menu – Admin panel
- admin menu: use default “general” page for theme settings using add_menu_page and add_submenu_page
- no themes or editor under appearance menu
- How to redirect one admin URL to another when admin page URL has “/admin.php?page=” in it?
- How to remove an item from menu bar’s +New menu based on User role
- Headers already sent error when creating multiple admin menu’s
- How can I place a page link to the sidebar admin bar?
- Admin tabs for custom plugin
- Restricted access for other user roles
- Tab order of post admin page
- How Do I create multiple Top Level Admin Menu Pages To submit data to the options table?
- Add internal page to admin menu
- Settings API – Checkboxes validation in a menu with multiple subpages
- How to include the admin bar?
- Hiding an added admin page menu using css
- Fatal error when using ‘#’ character as an admin menu link title
- How to create editable menu with parent and child in wordpress?
- How can I style my theme admin page?
- Admin menu links just refresh the page
- Responsive Admin Themes
- Add items to the dark menu in WordPress
- Remove menu pages only for non admin