Mobile Address Bar Color

Some mobile browsers allow you to customize the color of the address bar to match your site’s color. Add the code below to your theme’s functions.php file, and change #000000 to your color of choice.

<?php
/**
* Change Color of Mobile Address Bar
* @link http://www.billerickson.net/code/mobile-address-bar-color
*/
function be_mobile_address_bar_color() {
echo '<meta name="theme-color" content="#000000‬" />';
}
add_action( 'wp_head', 'be_mobile_address_bar_color' );
view raw functions.php hosted with ❤ by GitHub

Bill Erickson

Bill Erickson is a freelance WordPress developer and a contributing developer to the Genesis framework. For the past 14 years he has worked with attorneys, publishers, corporations, and non-profits, building custom websites tailored to their needs and goals.

Ready to upgrade your website?

I build custom WordPress websites that look great and are easy to manage.

Let's Talk