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.

/**
 * Change Color of Mobile Address Bar
 * @link https://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' )

Bill Erickson

Bill Erickson is the co-founder and lead developer at CultivateWP, a WordPress agency focusing on high performance sites for web publishers.

About Me
Ready to upgrade your website?

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

Let's Talk