Skip to content

Instantly share code, notes, and snippets.

@hofmannsven
Last active June 6, 2023 18:01
Show Gist options
  • Save hofmannsven/8269251 to your computer and use it in GitHub Desktop.
Save hofmannsven/8269251 to your computer and use it in GitHub Desktop.
Add WordPress admin menu pages with another Dashicon. (Note: This will require at least WordPress 3.8)
<?php
add_action( 'admin_menu', 'register_my_custom_menu_page' );
function register_my_custom_menu_page() {
// add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position );
add_menu_page( 'Custom Menu Page Title', 'Custom Menu Page', 'manage_options', 'custom.php', '', 'dashicons-awards', 90 );
}
?>
@okiewardoyo
Copy link

HI, nice explanation, but this page -> http://melchoyce.github.io/dashicons/ is not found,

@brichards
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment