Skip to main content

Favicons

wp-lemon comes with a class that automatically checks for the right icons and then pass them to WordPress. This way the favicon get's displayed on all theme pages. It also handles the generation of a site.webmanifest.

Favicons

WP Lemon comes with a very obvious set of default favicons. This is to force you to create your own. Luckily it is very easy to create your own set. Real Favicon Generator you can create your own set of favicons.

After generating your own set please place them in /web/app/themes/YOURCHILDTHEME/resources/favicons.

The following method checks if android-chrome-512x512.png is present in your new favicon folder. If so, your new generated files will be loaded instead of the default ones provided by the parent theme.

HighGround\Bulldozer\Site_Icons::filter_favicon_path

Manifest

The manifest is also handled by wp-lemon. Site_Icons creates a virtual site.webmanifest file in your site root and adds it to the head of your site as well. This way you do not have to worry about setting the proper URLs etc. It comes with sane default that you can overwrite.

If you're coming from version < 2.3 please add the following to your child theme.

use HighGround\Bulldozer\Site_Icons;
...
...

/**
* Setup Site icons and manifest.
*/
new Site_Icons([
'short_name' => 'WP Lemon Child',
'background_color' => '#f9f9f9',
'theme_color' => '#f7d600',
'display' => '#standalone',
'orientation' => 'portrait',
]);

This way you can overwrite the short name, background color and theme color. See Mozilla docs for more info.