{"id":29512,"date":"2025-12-30T09:09:46","date_gmt":"2025-12-30T09:09:46","guid":{"rendered":"https:\/\/makemehappy.sk\/?p=29512"},"modified":"2025-12-30T09:43:25","modified_gmt":"2025-12-30T09:43:25","slug":"ako-nastavit-farbu-status-baru-na-mobile-android-a-ios-vo-wordpresse","status":"publish","type":"post","link":"https:\/\/makemehappy.sk\/en\/ako-nastavit-farbu-status-baru-na-mobile-android-a-ios-vo-wordpresse\/","title":{"rendered":"How to Set Mobile Status Bar Color on Android and iOS in WordPress"},"content":{"rendered":"<section class=\"wp-block-greenshift-blocks-row alignfull gspb_row gspb_row-id-gsbp-f6f0565\" id=\"gspb_row-id-gsbp-f6f0565\"><div class=\"gspb_row__content\"> \n\n\n<div class=\"wp-block-greenshift-blocks-row-column gspb_row__col--12 gspb_col-id-gsbp-31d2043\" id=\"gspb_col-id-gsbp-31d2043\">\n<p class=\"wp-block-paragraph\">This snippet sets the color of the <strong>mobile browser status bar<\/strong> on smartphones and tablets.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>On Android<\/strong>, it changes the browser status bar color using the <code>theme-color<\/code> meta tag.<\/li>\n\n\n\n<li><strong>On iOS (Safari \/ PWA)<\/strong>, it enables web app mode and applies a dark, translucent status bar style.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The code is injected into the <code>&lt;head&gt;<\/code> section using the <code>wp_head<\/code> hook, which means it affects the entire website without modifying theme files.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The result is a cleaner and more consistent mobile appearance, especially for websites using a dark color scheme.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"\/en\/snippets\/\">How to insert the code?<\/a><\/div>\n<\/div>\n<\/div>\n <\/div><\/section>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-JetBrains-Mono\" style=\"font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:flex;align-items:center;padding:10px 0px 10px 16px;margin-bottom:-2px;width:100%;text-align:left;background-color:#2b2b2b;color:#c7c7c7\">PHP<\/span><span role=\"button\" tabindex=\"0\" style=\"color:#D4D4D4;display:none\" aria-label=\"Copy of\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>add_action( 'wp_head', function() {\n    ?>\n    &lt;!-- Android -->\n    &lt;meta name=\"theme-color\" content=\"#000000\">\n\n    &lt;!-- iOS (Safari \/ PWA) -->\n    &lt;meta name=\"apple-mobile-web-app-capable\" content=\"yes\">\n    &lt;meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\">\n    &lt;?php\n});<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewbox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki dark-plus\" style=\"background-color: #1E1E1E\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCDCAA\">add_action<\/span><span style=\"color: #D4D4D4\">( <\/span><span style=\"color: #CE9178\">'wp_head'<\/span><span style=\"color: #D4D4D4\">, <\/span><span style=\"color: #569CD6\">function<\/span><span style=\"color: #D4D4D4\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    ?&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    <!-- Android --><\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;meta name=<\/span><span style=\"color: #CE9178\">\"theme-color\"<\/span><span style=\"color: #D4D4D4\"> content=<\/span><span style=\"color: #CE9178\">\"#000000\"<\/span><span style=\"color: #D4D4D4\">&gt;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;!-- <\/span><span style=\"color: #DCDCAA\">iOS<\/span><span style=\"color: #D4D4D4\"> (Safari \/ PWA) --&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;meta name=<\/span><span style=\"color: #CE9178\">\"apple-mobile-web-app-capable\"<\/span><span style=\"color: #D4D4D4\"> content=<\/span><span style=\"color: #CE9178\">\"yes.\"<\/span><span style=\"color: #D4D4D4\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;meta name=<\/span><span style=\"color: #CE9178\">\"apple-mobile-web-app-status-bar-style\"<\/span><span style=\"color: #D4D4D4\"> content=<\/span><span style=\"color: #CE9178\">\"black-translucent\"<\/span><span style=\"color: #D4D4D4\">&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">    &lt;?php<\/span><\/span>\n<span class=\"line\"><span style=\"color: #D4D4D4\">});<\/span><\/span><\/code><\/pre><\/div>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":29535,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_gspb_post_css":"#gspb_row-id-gsbp-f6f0565{justify-content:space-between;margin-top:0;margin-bottom:0;display:flex;flex-wrap:wrap}#gspb_row-id-gsbp-f6f0565>.gspb_row__content{display:flex;justify-content:space-between;margin:0 auto;width:100%;flex-wrap:wrap}.gspb_row{position:relative}div[id^=gspb_col-id]{box-sizing:border-box;position:relative;padding:var(--gs-row-column-padding, 15px min(3vw, 20px))}body.gspb-bodyfront #gspb_row-id-gsbp-f6f0565>.gspb_row__content{width:var(--theme-container-width, 1200px);max-width:var(--theme-normal-container-max-width, 1200px)}#gspb_col-id-gsbp-7407cb4.gspb_row__col--12{width:100%}@media (max-width:575.98px){#gspb_col-id-gsbp-7407cb4.gspb_row__col--12{width:100%}}#gspb_col-id-gsbp-31d2043.gspb_row__col--12{width:100%}@media (max-width:575.98px){#gspb_col-id-gsbp-31d2043.gspb_row__col--12{width:100%}}","footnotes":""},"categories":[105],"tags":[],"class_list":["post-29512","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-snippet"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/makemehappy.sk\/en\/wp-json\/wp\/v2\/posts\/29512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/makemehappy.sk\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/makemehappy.sk\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/makemehappy.sk\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/makemehappy.sk\/en\/wp-json\/wp\/v2\/comments?post=29512"}],"version-history":[{"count":11,"href":"https:\/\/makemehappy.sk\/en\/wp-json\/wp\/v2\/posts\/29512\/revisions"}],"predecessor-version":[{"id":29529,"href":"https:\/\/makemehappy.sk\/en\/wp-json\/wp\/v2\/posts\/29512\/revisions\/29529"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/makemehappy.sk\/en\/wp-json\/wp\/v2\/media\/29535"}],"wp:attachment":[{"href":"https:\/\/makemehappy.sk\/en\/wp-json\/wp\/v2\/media?parent=29512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/makemehappy.sk\/en\/wp-json\/wp\/v2\/categories?post=29512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/makemehappy.sk\/en\/wp-json\/wp\/v2\/tags?post=29512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}