wp-lemon Docs

Favicons

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.

library/child-setup.php
1use HighGround\Bulldozer\Site_Icons;
2...
3...
4
5/**
6 * Setup Site icons and manifest.
7 */
8$icons = new Site_Icons;
9$icons->name = 'Name'; //defaults to site name
10$icons->short_name = 'Short name'; //defaults to '' https://developer.mozilla.org/en-US/docs/Web/Manifest/short_name
11$icons->display = 'standalone'; // can be fullscreen, standalone, minimal-ui, browser
12$icons->orientation = 'portrait'; // can be portrait, landscape, any
13$icons->background_color = '#f7d600'; // must be hex color
14$icons->theme_color = '#f7d600'; // must be hex color

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

Edit this page on GitHub

On this page