Created
December 3, 2015 08:25
-
-
Save caralgar/13f142526e91ff27ad5b to your computer and use it in GitHub Desktop.
How to add custom menu to dashboard (or remove)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Reference @codex: | |
- Add menu: https://codex.wordpress.org/Function_Reference/add_menu_page | |
- Select icon: https://developer.wordpress.org/resource/dashicons/#menu | |
- Remove menu: https://codex.wordpress.org/Function_Reference/remove_menu_page | |
- Remove sub-menu: https://codex.wordpress.org/remove_submenu_page | |
*/ | |
add_action( 'admin_menu', 'register_custom_menu' ); | |
function register_custom_menu() { | |
//add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); | |
add_menu_page( 'Menús', 'Menús', 'manage_options', 'nav-menus.php', '', 'dashicons-menu', 21 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment