I'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:

    function user_data(){
      add_menu_page('User Data','User data','manage_options','user-page','user_data_options');
    function user_data_options(){

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.