Give your WordPress custom post type its own menu icon
Replace the default pin icon in the WordPress admin menu with one that fits your content.
From the archive: first published on mohamedsharaf.net in May 2011. Rewritten and checked in 2026; some details may be out of date.
In 2011, giving a custom post type its own admin menu icon meant injecting CSS with a sprite image from the Fugue icon set. Since WordPress 3.8 it is one argument when you register the post type:
register_post_type( 'project', array(
'label' => 'Projects',
'public' => true,
'menu_icon' => 'dashicons-portfolio',
) );
menu_icon accepts any name from the built-in Dashicons set, the URL of your own image, or an SVG encoded as a data:image/svg+xml;base64,… string. No extra CSS needed.