{"id":624,"date":"2023-09-08T09:11:00","date_gmt":"2023-09-08T09:11:00","guid":{"rendered":"https:\/\/blog.hostinger.io\/support\/2023\/09\/08\/8347670-hostinger-website-builder-how-to-change-the-header-section-color-on-specific-pages\/"},"modified":"2026-10-29T14:43:22","modified_gmt":"2026-10-29T14:43:22","slug":"8347670-hostinger-ai-builder-manual-mode-how-to-change-the-header-section-color-on-specific-pages","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/8347670-hostinger-ai-builder-manual-mode-how-to-change-the-header-section-color-on-specific-pages\/","title":{"rendered":"Hostinger AI Builder: How to change the header color on specific pages in manual mode"},"content":{"rendered":"<p>Set only one <a data-click-id=\"hgr-post-content-link-header-background-color\" href=\"\/support\/6463972-hostinger-ai-builder-manual-mode-how-to-edit-the-header-section\/#h_5fd2929943\">header background color<\/a> by default in <a data-click-id=\"hgr-post-content-link-hostinger-ai-builder\" href=\"\/ai-builder\">Hostinger AI Builder<\/a> manual mode. Keep the header transparent to make it match the color of each page&rsquo;s first section, or use custom code to set different header colors on different pages.<\/p><h2 class=\"no-margin\" id=\"h-enable-a-transparent-header\">Enable a transparent header<\/h2><ol>\n<li>Click <strong>Edit header<\/strong>:<br>\n<img decoding=\"async\" class=\"aligncenter wp-image-8573 size-large\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/03\/builder-header-scaled.png\/w=1024,h=127,fit=scale-down\" alt=\"Edit header button in the header toolbar\" width=\"1024\" height=\"127\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/03\/builder-header-scaled.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/03\/builder-header-scaled.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/03\/builder-header-scaled.png\/w=768,fit=scale-down 768w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/03\/builder-header-scaled.png\/w=1536,fit=scale-down 1536w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/03\/builder-header-scaled.png\/w=2048,fit=scale-down 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/li>\n<li>Open the tab <a data-click-id=\"hgr-post-content-link-style\" href=\"\/support\/10456392-hostinger-ai-builder-manual-mode-how-to-style-the-header-section\/\"><strong>Style<\/strong><\/a>, and toggle on&nbsp;<strong>Transparent header<\/strong>. In this specific case, this would make the header purple, taking the color of the narrow section about free shipping:<br>\n<img decoding=\"async\" class=\"aligncenter wp-image-8600\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/03\/transparent-background.png\/public\" alt=\"Header settings popup with Transparent header toggle highlighted in Style tab\" width=\"500\" height=\"478\" data-media-id=\"8600\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/03\/transparent-background.png\/w=1228,fit=scale-down 1228w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/03\/transparent-background.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/03\/transparent-background.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/55\/2026\/03\/transparent-background.png\/w=768,fit=scale-down 768w\" sizes=\"(max-width: 500px) 100vw, 500px\" \/><\/li>\n<\/ol><p data-start=\"367\" data-end=\"562\">Alternatively, if you want to use different header background colors on different pages, you can do so using <a data-click-id=\"hgr-post-content-link-custom-code\" class=\"intercom-content-link\" href=\"\/support\/6445594-hostinger-ai-builder-manual-mode-how-to-integrate-custom-code\/\" target=\"_blank\" rel=\"noopener\">custom code<\/a>.<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e3e7fa80;border-color: #334bfa33\">\n<p class=\"no-margin\">Changes made via custom code will be visible in preview mode and online, but not within the editor.<\/p>\n<\/div><h2 id=\"h-set-different-header-colors-per-page-using-custom-code\">Set different header colors per page using custom code<\/h2><ol>\n<li>Copy the code below for your desired setup into a plain text editor: one specific page, multiple pages, or all pages except one.<\/li>\n<li>Customize the code:\n<ol>\n<li>Replace <code data-start=\"982\" data-end=\"990\">'#f00'<\/code> with your preferred color name (e.g., <code data-start=\"1029\" data-end=\"1038\">'green'<\/code>) or HEX code (e.g., <code data-start=\"1059\" data-end=\"1070\">'#008000'<\/code>).<\/li>\n<li>Replace the page path (e.g., <code data-start=\"1109\" data-end=\"1121\">'\/contact'<\/code>) with the <strong data-start=\"1132\" data-end=\"1140\">slug<\/strong> of the page you want to target.<\/li>\n<\/ol>\n<\/li>\n<li>In the AI Builder, go to (&#8943;) more &rarr; <strong>Integrations<\/strong>.<\/li>\n<li>Paste the code into the <strong>Custom code<\/strong> field and save your changes.<\/li>\n<li><a data-click-id=\"hgr-post-content-link-publish\" href=\"\/support\/6475340-hostinger-ai-builder-manual-mode-how-to-publish-a-website\/\">Publish<\/a> your website to apply the changes.<\/li>\n<\/ol><h3><strong>What is a slug?<\/strong><\/h3><p data-start=\"1181\" data-end=\"1301\">A slug is the part of a URL that identifies a specific page on your website. For example:<\/p><ul data-start=\"1307\" data-end=\"1448\">\n<li data-start=\"1307\" data-end=\"1352\">\n<p data-start=\"1309\" data-end=\"1352\"><code data-start=\"1309\" data-end=\"1337\">https:\/\/domain.tld\/contact<\/code> &rarr; <code data-start=\"1340\" data-end=\"1350\">\/contact<\/code><\/p>\n<\/li>\n<li data-start=\"1358\" data-end=\"1448\">\n<p data-start=\"1360\" data-end=\"1448\"><code data-start=\"1360\" data-end=\"1389\">https:\/\/domain.tld\/about-us<\/code> &rarr; <code data-start=\"1392\" data-end=\"1403\">\/about-us<\/code><br data-start=\"1403\" data-end=\"1406\">To target the homepage, use <code data-start=\"1439\" data-end=\"1442\">\/<\/code> only.<\/p>\n<\/li>\n<\/ul><h3 id=\"h_429a2252f1\">Change the header background color on one specific page<\/h3><p class=\"no-margin\">Copy the code below and customize it:<\/p><div class=\"intercom-interblocks-callout\" style=\"background-color: #e8e8e880;border-color: #73737633\">\n<p class=\"no-margin\">&lt;script&gt;<\/p>\n<p class=\"no-margin\">let newHeaderColor = &lsquo;#f00&rsquo;;<\/p>\n<p class=\"no-margin\">setInterval(() =&gt; {<\/p>\n<p class=\"no-margin\">if (document.querySelector(&lsquo;.background&rsquo;)) {<\/p>\n<p class=\"no-margin\">if (window.location.pathname === &lsquo;\/contact&rsquo;) {<\/p>\n<p class=\"no-margin\">document.querySelector(&lsquo;.background&rsquo;).style.backgroundColor = newHeaderColor;<\/p>\n<p class=\"no-margin\">document.querySelectorAll(&lsquo;.block-header-item__dropdown&rsquo;).forEach(dropdown =&gt; {<\/p>\n<p class=\"no-margin\">dropdown.style.backgroundColor = newHeaderColor;<\/p>\n<p class=\"no-margin\">})<\/p>\n<p class=\"no-margin\">}<\/p>\n<p class=\"no-margin\">else {<\/p>\n<p class=\"no-margin\">document.querySelector(&lsquo;.background&rsquo;).style.backgroundColor = &rdquo;;<\/p>\n<p class=\"no-margin\">document.querySelectorAll(&lsquo;.block-header-item__dropdown&rsquo;).forEach(dropdown =&gt; {<\/p>\n<p class=\"no-margin\">dropdown.style.backgroundColor = &rdquo;;<\/p>\n<p class=\"no-margin\">})<\/p>\n<p class=\"no-margin\">}<\/p>\n<p class=\"no-margin\">}<\/p>\n<p class=\"no-margin\">});<\/p>\n<p class=\"no-margin\">&lt;\/script&gt;<\/p>\n<\/div><h3 id=\"h_53e9859257\">Change the header background color on multiple pages<\/h3><p class=\"no-margin\">Copy the code below and customize it:<\/p><pre><code>&lt;script&gt;\r\n    let newHeaderColor = '#f00';\r\n    setInterval(() =&gt; {\r\n        if (document.querySelector('.background')) {\r\n            if (window.location.pathname === '\/' || window.location.pathname === '\/contact') {                document.querySelector('.background').style.backgroundColor = newHeaderColor;\r\n                document.querySelectorAll('.block-header-item__dropdown').forEach(dropdown =&gt; {\r\n                    dropdown.style.backgroundColor = newHeaderColor;\r\n                })\r\n            }\r\n            else {                document.querySelector('.background').style.backgroundColor = '';\r\n                document.querySelectorAll('.block-header-item__dropdown').forEach(dropdown =&gt; {\r\n                    dropdown.style.backgroundColor = '';\r\n                })\r\n            }\r\n        }\r\n    });\r\n&lt;\/script&gt;<\/code><\/pre><ul>\n<li class=\"no-margin\">To change the header color on more pages, copy this part:<\/li>\n<\/ul><pre><code>|| window.location.pathname === '\/contact'<\/code><\/pre><ul>\n<li class=\"no-margin\">Change the slug (<code>\/contact<\/code>) and add it to the end of the statement, for instance:<\/li>\n<\/ul><pre><code>if (window.location.pathname === '\/contact' || window.location.pathname === '\/about-us' || window.location.pathname === '\/blog')\r\n<\/code><\/pre><p>&nbsp;<\/p><h3 id=\"h_5b5c98f8d4\">Change the header background color on all pages except one<\/h3><p class=\"no-margin\">Copy the code below and customize it:<\/p><pre><code>&lt;script&gt;\r\n    let newHeaderColor = '#f00';\r\n    setInterval(() =&gt; {\r\n        if (document.querySelector('.background')) {\r\n            if (window.location.pathname !== '\/') {                document.querySelector('.background').style.backgroundColor = newHeaderColor;\r\n                document.querySelectorAll('.block-header-item__dropdown').forEach(dropdown =&gt; {\r\n                    dropdown.style.backgroundColor = newHeaderColor;\r\n                })\r\n            }\r\n            else {                document.querySelector('.background').style.backgroundColor = '';\r\n                document.querySelectorAll('.block-header-item__dropdown').forEach(dropdown =&gt; {\r\n                    dropdown.style.backgroundColor = '';\r\n                })\r\n            }\r\n        }\r\n    });\r\n&lt;\/script&gt;<\/code><\/pre><p class=\"no-margin\">Your header now displays your chosen colors across the pages you&rsquo;ve configured.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Set different header background colors on specific pages in Hostinger AI Builder manual mode using custom code.<\/p>\n","protected":false},"author":581,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_content_updated_date":"","include_on_kodee":true,"footnotes":""},"categories":[293],"tags":[],"class_list":["post-624","post","type-post","status-publish","format-standard","hentry","category-ai-builder"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/support\/8347670-hostinger-ai-builder-manual-mode-how-to-change-the-header-section-color-on-specific-pages","default":1}],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=624"}],"version-history":[{"count":10,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/624\/revisions"}],"predecessor-version":[{"id":22608,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/624\/revisions\/22608"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}