Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Change the Color of Address Bar in Mobile Browser to Match Your WordPress Site

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want to change the color of the address bar in the mobile browser to match your WordPress site?

Many popular websites like BBC and Facebook use their own brand colors for the address bar in mobile browsers. By doing this, you can create a more cohesive and branded experience for your users and increase engagement.

In this article, we will show you how to easily change the color of the address bar in a mobile browser to match your WordPress site.

Address bar color in mobile browser for WordPress site

Why Match Address Bar Color in Mobile Browser?

Most popular WordPress themes are mobile responsive. This makes your site look great on mobile devices. However, it still looks and feels like a website.

By matching the color of the address bar to your WordPress site, you can provide a native app-like feel. This improves user experience, which ultimately boosts sales and conversions.

Color address bars in mobile browser on Android

A well-chosen address bar color can even make your website look more professional and visually appealing.

Having said that, let’s see how to easily match the address bar on the mobile browser to your WordPress theme.

Note: Please remember that this method currently only works for the Google Chrome web browser on Android devices using Lollipop or newer versions.

How to Change the Color of Address Bar in Mobile Browser to Match Your WordPress Site

You can easily change the address bar color in the mobile browser by adding custom code to your theme or child theme’s header.php file just before the closing </head> tag.

Although, the smallest error may break your website and make it inaccessible.

That is why we recommend using WPCode. It is the best WordPress code snippets plugin on the market and the safest way to add custom code to your website.

First, you need to install and activate the WPCode plugin. For detailed instructions, see our step-by-step guide on how to install a WordPress plugin.

Note: The WPCode plugin also has a free version that you can use for this tutorial. However, upgrading to the paid plan will give you access to features like code snippet library, conditional logic, CSS Snippet option, and more.

Upon activation, visit the Code Snippets » + Add Snippet page from the WordPress admin sidebar.

Here, click the ‘Use Snippet’ button under the ‘Add Your Custom Code (New Snippet)’ option.

Add

This will take you to the ‘Create Custom Snippet’ page where you can start by adding a name for the code snippet. This name won’t be shown on the front end and is only for your identification.

Next, select ‘HTML Snippet’ as the code type from the dropdown menu on the right.

Choose HTML Snippet option to change the address bar color in mobile browsers

Now all you have to do is copy and paste the following code snippet into the ‘Code Preview’ box.

<meta name="theme-color" content="#ff6600" />

Once you do that, you can add the hex code for the color of your choice next to the content= line in the code.

This color will then be used for your address bar in the mobile browser.

Tip: You can get the HEX value of a color using any image editing software like Adobe Photoshop, Gimp, Paint, etc.

Add Hex code

After that, scroll down to the ‘Insertion’ section and choose the ‘Auto Insert’ mode.

This way the code will automatically be executed on your website upon activation.

Choose the Auto Insert mode

Finally, scroll back to the top and toggle the ‘Inactive’ switch to ‘Active’.

Next, click the ‘Save Snippet’ button to store your settings and execute the code.

Save the code snippet for changing the address bar color in the mobile browser

Thats it! We hope this article helped you learn how to change the color of the address bar in a mobile browser to match your WordPress site. You may also want to see our beginner’s guide on how to customize colors on your WordPress website and our expert picks for the best page builder plugins for WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

70 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    Thank you for the instructions. I used them on my website and it works great. Too bad it only works on mobile Chrome.

  3. Jiří Vaněk says

    Thank you for the instructions. I used them on my website, and now the Chrome browser on mobile displays it with the colors of the website’s header. It looks much better. It’s just a pity that, most likely, no other browser besides mobile Chrome supports it.

    • WPBeginner Support says

      Some other mobile browsers are starting to adopt it so it should hopefully start to be seen more often :)

      Admin

  4. Sarah says

    This seems to have stopped working… I implemented this on my website back in Feb and I just applied it to another one… upon checking the new one doesn’t work and neither does the old! Did something change here in Chrome mobile app?

    • WPBeginner Support says

      If you’re using dark mode for your browser, chrome will override this setting.

      Admin

    • WPBeginner Support says

      You would want to check with the support for your specific theme that thee is not a different header styling being assigned to those pages.

      Admin

  5. Aditya Savita says

    First of all thank you for this great tutorial but now I’m facing a problem the address bar color is not showing on the homepage of my site. It’s perfectly showing on all pages and posts of my site except my homepage.
    What should I do now? Please help!

    • WPBeginner Support says

      You may want to check with the support for your specific theme that it is not set on the homepage template that could be overriding your settings.

      Admin

  6. Ebrahim Talebi says

    Thanks a lot.
    But, be aware that this trick won’t work if the user has enabled dark mode on its phone because it overrides everything else. (Some phones has an option called dark mode)

  7. Fred says

    Another very easy tutorial from your team!

    I would like to add a gradient color to the address bar.

    Is it possible?

    • WPBeginner Support says

      Unless I hear otherwise, that is decided by the mobile browser, not a color you set.

      Admin

  8. Craig Jon Smith says

    Worked great for me on Weebly. Instead of messing with the code just go to settings, and drop it in the section that literally says header code. I’ve done it to two sites, now. One more to go

  9. Akash gupta says

    Simply add this code in your theme or child theme‘s header.php file just before the closing tag.

    but it is not work in one website . why?

  10. enack says

    Great tip, worked great for my site (as your site always does) do let me know if you get the code for iphones also but either way can’t complain. Thanks!

  11. zakaria says

    hello, thanks for this tip but is that working on blogger s templates? if yes how to add it? i ve tried many times but blogger always showing error.

Leave a Reply to Irfan abbas Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WPBeginner Assistant
How can I help you?

By chatting, you consent to this chat being stored according to our privacy policy and your email will be added to receive weekly WordPress tutorials from WPBeginner.