This snippet sets the color of the mobile browser status bar on smartphones and tablets.
- On Android, it changes the browser status bar color using the
theme-colormeta tag. - On iOS (Safari / PWA), it enables web app mode and applies a dark, translucent status bar style.
The code is injected into the <head> section using the wp_head hook, which means it affects the entire website without modifying theme files.
The result is a cleaner and more consistent mobile appearance, especially for websites using a dark color scheme.
PHP
add_action( 'wp_head', function() {
?>
<!-- Android -->
<meta name="theme-color" content="#000000">
<!-- iOS (Safari / PWA) -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<?php
});

