For a particular custom post type I’m setting, I simply want to change the default icon to the wordpress pages icon (menu-icon-page).
I know I could upload my own pages icon and point to it, but can I just tell wordpress to use the default pages icon?
Here’s what I’m using
register_post_type( 'intranet-pages', // creates the custom admin panel
array(
'labels' => array(
...
'menu_icon' => menu-icon-page,
I’ve tried to do different variations and can’t figure it out. Thoughts? If I have to upload my own I will. Just don’t want to duplicate if it’s not necessary. Thanks!
UPDATE: According to this, it can’t be done: How to use a WordPress’ existing admin icon? At least not this simply. Does this still apply? Looks like I’ll be uploading it.
UPDATE 2: See below for a more elegant solution. Simply uploading and using menu_icon => doesn’t allow for the nice hover effects or the 32px icon on the edit screen.
This way is much better I believe as it also allows to add hover effect and change big icon as well. Add this piece of code and it should work. Just don’t forget to change icon url path.