• Hi guys, I’m customizing the admin/ dahsboard page.
    I need somehow to build a similar menu like on the left side, (or to move it with css if possible) so ill remove the left side and include the menu items in the dashboard area.

    the html code for the admin menu is in /wp-admin/menu-header.php,
    and i’m trying to copy / paste the div#adminmenuwrap or the whole file to the wp-admin/include/dashboard.php.
    but it is throwing an error.
    Any body can help me?

    Thank you in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    FYI, you should never modify core files. Your work will be wiped out during the next update. Forgoing updates to avoid this can open your site up to serious security vulnerabilities. You should be able to manage most things with a plugin that utilizes action and filter hooks to get things done. There’s no valid reason to alter core files.

    I agree with Nisha that you are better off altering the menu instead of removing it and creating your own. But if you must, all dashboard items are meta-boxes. You can create a meta-box that will do almost anything.

    Thread Starter isitegate

    (@isitegate)

    Thank you guys for this valuable advice,yes I forget about the updates ??

    So now if I wanna make my own plugin??
    What code block should make me able to remove the left side menu and creste another menu in the dashboard, probably pics n vids too?
    Thanks a lot in advance.

    Moderator bcworkz

    (@bcworkz)

    We normally remove admin menu items with remove_menu_page() and remove_submenu_page(). It will be more expedient to assign empty arrays to the globals $menu and $submenu. This must be done after all menu items have been added by other entities. What should work is adding your callback to the “admin_menu” action with a large priority parameter. Or if you prefer, just hide the entire menu with CSS. When you actually remove the menu items, you’ll be left with an empty menu area on the left that needs to be hidden anyway.

    The dashboard widgets are not widgets like we drag/drop for front end sidebar content. They are simply meta boxes like a plugin dev might add to the post edit screen. These are defined primarily by writing a callback that handles all the necessary output. Within this callback you can do nearly anything that’s possible with PHP. Unlike conventional meta boxes, dashboard widgets are added with wp_add_dashboard_widget(). For more guidance on this, review how WP manages the default widgets on /wp-admin/includes/dashboard.php.

    For general guidance on plugins in general, if you have not yet seen it, please refer to the Plugin Handbook.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to create another admin menu in the dashboard area’ is closed to new replies.