Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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:

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');
    }
share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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