There are still many browsers that don’t support SVG favicons so you’ll want a fallback. It seems that the SVG favicon is prioritized over the WP generated one regardless of whether it appears before or after it in the page markup, but I have the priority set to 100 so it will appear after, just in case.Įven with this approach, you should upload a JPG version of the favicon in the WordPress customizer. I added my favicon.svg to my theme’s /assets/images/ directory, but you can add it anywhere in your theme.Īdd the following code to your theme’s functions.php file to include the SVG favicon. You can use ( prefers-color-scheme: dark ) to style the dark mode version differently. In this example we used a
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |