Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
Closed last month.
Improve this questionI'm newbie and I'm trying to create a plugin to add a menu to left menu in admin section. i have create the page but it is working fine. but i find the left menu being displayed twice. how can I resolve the issue. Find below my code:
add_action('admin_menu','user_data');
function user_data(){
add_menu_page('User Data','User data','manage_options','user-page','user_data_options');
}
function user_data_options(){
include('user-page.php');
}
Closed. This question is off-topic. It is not currently accepting answers.
Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?
Closed last month.
Improve this questionI'm newbie and I'm trying to create a plugin to add a menu to left menu in admin section. i have create the page but it is working fine. but i find the left menu being displayed twice. how can I resolve the issue. Find below my code:
add_action('admin_menu','user_data');
function user_data(){
add_menu_page('User Data','User data','manage_options','user-page','user_data_options');
}
function user_data_options(){
include('user-page.php');
}
Have you added any submenus under this, sub-menus can duplicate the parent menu item. (http://wordpress.org/support/topic/top-level-menu-duplicated-as-submenu-in-admin-section-plugin and many more).
Or do you mean the left menu is duplicated in full? If so it's probably due to an include in your user-page.php file.