1
votes

When you create a custom theme in WordPress, you can add a link to your theme options on the left menu in the WP dashboard. The default icon that's used next to your menu label is called generic.png and resides in the wp-admin/images directory.

Anyone know how to tell WP to use my theme's custom favicon.png instead of the default?

2

2 Answers

4
votes

I figured this one out. Hopefully it can help others:

add_menu_page('Page title', 'Top-level menu title', 
'administrator', 'my-top-level-handle',
'my_magic_function','../wp-content/themes/yourTheme/img/favicon.png');

You can also add a submenu under your theme's main menu item like so...

add_submenu_page( 'my-top-level-handle', 'Page title',
'Sub-menu title', 'administrator', 'my-submenu-handle', 'my_magic_function')
0
votes

Easiest way is to use ICO format for your Favicon.

If you have other image for and want it to convert in ICO format, you can use ICO Converter to do that!