Skip to content

Instantly share code, notes, and snippets.

@dartiss
Last active Dec 5, 2021
Embed
What would you like to do?
Add theme color support to a WordPress site
<?php
/**
* Add support for a theme colour
*/
function add_theme_colour() {
?>
<meta name="theme-color" content="#BE702B" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#333333" media="(prefers-color-scheme: dark)">
<?php
}
add_action( 'wp_head', 'add_theme_colour' );
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment