- Advertisement -
Do you want to set the color of the address bar/status bar on your mobile browsers to match your carrington mobile theme color? Here is a simple and effective guide to set the color of the address bar so that when your site is viewed on mobile theme it will look cool like the before and after screenshot example below.
Steps to set the address bar color on carrington mobile theme
To set the color of the address bar follow 1 to 3 method below
- go to theme editor >> appearance
- Selec carrington theme
- look for function.php file
- insert below codes and press save
function address_mobile_address_bar() {
$color = "#008509";
//this is for Chrome, Firefox OS, Opera and Vivaldi
echo '';
//Windows Phone **
echo '';
// iOS Safari
echo '';
echo '';
}
add_action( 'wp_head', 'address_mobile_address_bar' );
Now you are done and if you visit your site on mobile phone it should be showing by now. Please remember there is another method you can use to achieve same result but that method is outdated. The method is to add <meta name="theme-color" content="#ff6600" />
which is a bad practice. Please follow the best practice I mentioned above.