Is there a way to decide from init whether we are on a certain backend page?
There are few functions/global variable in WP to determine is_admin() – For checking if in admin panel global $pagename – to get the page name of admin
There are few functions/global variable in WP to determine is_admin() – For checking if in admin panel global $pagename – to get the page name of admin
Add submenu page to a custom menu page
How to show metabox in custom php menu page
Multiple plugins settings of same developer into ONE settings page linked together
Change default URL (or permalinks) in the back-end
TL;DR: Yes, it’s possible to add a Custom Dashboard Widget to a Custom Admin Menu Page. Option-1: Without the dashboard like UI: If all you want is just displaying the custom Widget data (without the UI), then you can simply call the function that was used to display the custom dashboard widget content. For your … Read more
you can add new menu from WordPress admin on this https://de.ferberg.com/wp-admin/nav-menus.php?action=edit&menu=0 and then you need to call this menu where you’re calling your footer menu.
My first guess is that the theme has a code that creates the menu item.
Try adding the action after the function like this: function mt_add_pages() { // Add theme options page to the addmin menu add_menu_page(__(‘Competition’,’comp’), __(‘Competition’,’comp’), ‘manage_options’, ‘mt-top-level-handle’, ‘test_func’, ”, 5 ); add_submenu_page(‘mt-top-level-handle’, __(‘Answers’,’comp-answers’), __(‘Answers’,’comp-answers’), ‘manage_options’, ‘sub-page’, ‘test_func2’); } add_action( ‘admin_menu’, ‘mt_add_pages’ );
You have to create a new array for the new item and pass the parent parameter as the id of this already created item. In your case, the args array should be like this: $args = array( ‘id’ => ‘my-item’, ‘title’ => ‘My Item’, ‘href’ => ‘#’, ‘parent’ => ‘theme_page’, ‘meta’ => array( ‘title’ => … Read more