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

When you’re building a WordPress site that works well on phones, you probably focus on making sure everything fits the screen and loads quickly.

But there’s another small detail that can improve your site’s mobile experience: changing the color of the address bar in a mobile browser to match your WordPress site.

This makes your website look more polished, professional, and consistent with your brand.

We’ve helped many WordPress site owners improve their mobile design, and this is one of those simple tweaks that can make a noticeable difference.

In this guide, we’ll show you the easiest way to change the color of the address bar in a mobile browser to match your WordPress site’s design.

Address bar color in mobile browser for WordPress site

💡 TL;DR: You can change the mobile browser address bar color in WordPress by using the WPCode plugin. Simply create a new HTML snippet, add the theme-color meta tag with your preferred hex color, set it to auto-insert, and activate the snippet to apply the changes across your site.

Why Change the Color of the Address Bar in a Mobile Browser?

Changing the color of the address bar in a mobile browser helps your WordPress site look more polished and visually consistent.

It creates a smoother mobile experience by matching the browser interface with your website’s branding and design.

Here are some of the biggest benefits:

  • Creates visual consistency: Matching the address bar color with your site design gives your website a cleaner and more unified appearance.
  • Improves the mobile experience: It helps your website feel more polished and app-like on mobile devices.
  • Strengthens your branding: Using your brand colors in the browser interface makes your website feel more professional and recognizable.
  • Makes your site feel more modern: A customized mobile browser color can make your website stand out compared to generic mobile pages.

While this is a small design change, it can make your WordPress site feel much more refined for mobile visitors.

Color address bars in mobile browser on Android

Browser Support for Mobile Address Bar Colors

Before changing your mobile browser address bar color, it’s important to know that support can vary depending on the browser and device being used.

Here’s a quick overview of how popular mobile browsers handle the theme-color meta tag:

Browser/PlatformSupport StatusNotes
Google Chrome (Android)Full SupportChanges address bar color for a cohesive look.
Safari (iOS)No Direct Support for Address Bar ColorHandles theme-color for PWA manifests and browser UI elements, but not the general address bar.
Firefox (Android)Partial/VariesSupport can vary by specific version and browser theme settings.
Older/Unsupported BrowsersNo SupportGracefully ignores the setting without causing any issues on your site.

To change the address bar color, mobile browsers use a small piece of HTML called the theme-color meta tag. This tells supported browsers which color to use for interface elements like the address bar.

You can add this code to your WordPress site by inserting the meta tag inside your theme’s <head> section.

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

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. After thorough testing, we have concluded that it is the best WordPress code snippets plugin and the safest way to add code to your website.

For more details about the plugin, you can take a look at our WPCode review.

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, 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 prompt that appears.

Add HTML snippet

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.

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

For a quicker method that doesn’t require any special software, you can use a free online color picker or even your web browser’s built-in “Inspect” tool to find the exact hex code from your site.

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

Bonus Tips to Create a Mobile-Friendly WordPress Site

Changing the address bar color is a great start, but creating a truly mobile-friendly website involves a few more steps.

Since search engines like Google prioritize mobile-first indexing, a good mobile experience is vital for your SEO. In fact, mobile devices account for the majority of all internet traffic.

Here are some other tips to improve your site for those visitors:

  • Use a Responsive Theme or Page Builder: Your foundation should be a responsive WordPress theme that adapts to different screen sizes. For even more control, if you’re a beginner wanting to build custom layouts without code, you can use a plugin like SeedProd. It’s a visual drag-and-drop page builder trusted by over 1 million users, letting you create custom mobile-friendly layouts easily.
  • Build Mobile-Ready Forms: Ensure your contact forms, login forms, and surveys are easy to fill out on a small screen. We recommend a plugin like WPForms. It is an easy-to-use form builder, trusted by over 6 million websites and rated 4.9/5 stars. Its drag-and-drop interface and optimized templates make it super easy to create mobile-ready forms.
  • Optimize Images and Media: Large images can slow down your site on mobile connections. Make sure to resize and compress your images for the web before uploading them.
  • Focus on Site Speed: Beyond images, you can speed up your site by using a fast WordPress hosting provider, enabling lazy loading for comments, and using a caching plugin.

To learn more, see our full tutorial on ways to create a mobile-friendly WordPress site.

Why Does My WordPress Site Look Different on Different Browsers?

It’s completely normal for your WordPress site to look slightly different across browsers like Chrome, Firefox, Safari, or Edge. In most cases, this doesn’t mean something is broken.

Different browsers simply display websites in slightly different ways. Here are some common reasons why this happens:

  • Browsers use different rendering engines: Each browser processes HTML, CSS, and JavaScript differently, which can affect layout and styling.
  • Default browser styles can vary: Browsers apply their own default styling to elements like headings, buttons, and forms.
  • Devices and operating systems affect appearance: Screen size, font rendering, and operating system settings can change how your site looks.
  • Caching may show older content: One browser may still display a cached version of your website while another shows the latest updates.
  • User settings can change the display: Zoom levels, custom fonts, or accessibility settings may affect how visitors see your site.

To reduce these differences, we recommend using a responsive WordPress theme and testing your site on multiple browsers and devices before publishing major changes.

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.

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

77 CommentsLeave a Reply

  1. I love the look of the mobile tab matching the very top header on a website, so I have been looking for a way to do this. I have followed all of these instructions, but nothing changed when I viewed my site on mobile. Any suggestions?

    • Does your phone use dark mode or another styling that overrides the styling set by your site’s theme? That is the most common reason why the styling is not matching what you have set using this method as your phone will take priority over what your site has set.

      Admin

  2. That’s cool. Could you help us changing the navigation bar too? I have seen few of sites implementing that as well.

    • You would want to check with the support for your specific theme first as each theme has it’s own design and settings for their navigation bar.

      Admin

  3. I remember implementing this back then. THings have changed nowadays, the UI now completely looks different from back then.

  4. I have been looking for ways to do this since, I just discovered it in this post. I am surprised that it is just a single line of code that does the magic. I will be applying it to my site because I like the functionality.

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

  6. 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.

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

      Admin

      • Hopefully, more browsers will support it over time, because so far, I have verified this function only on mobile Chrome. It would be amazing if all mobile browsers could do this because it not only makes the web look better, but since not many people use it, it also adds a unique touch. Hopefully, we will see this in more browsers in the future.

        • Exactly! it adds a unique touch to sites and makes them more professional and attractive to visitors. Although Chrome was the first to adopt it, I have now noticed that other browsers, like Vivaldi, are also adopting it. Thanks for your observation.

  7. 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?

    • 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

  8. 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!

    • 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

  9. 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)

  10. Another very easy tutorial from your team!

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

    Is it possible?

  11. 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

  12. 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?

  13. 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!

  14. 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

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.