{"id":7048241,"date":"2026-08-26T07:47:04","date_gmt":"2026-08-26T07:47:04","guid":{"rendered":"https:\/\/peraltafinancing.com\/uncategorized\/how-to-add-custom-scripts-with-astra-site-builder-hooks-layout\/"},"modified":"2026-08-26T07:47:04","modified_gmt":"2026-08-26T07:47:04","slug":"how-to-add-custom-scripts-with-astra-site-builder-hooks-layout","status":"publish","type":"post","link":"https:\/\/fivemor.com\/?p=7048241","title":{"rendered":"How to Add Custom Scripts With Astra Site Builder Hooks Layout"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div data-ast-blocks-layout=\"true\" itemprop=\"text\">\n<p class=\"wp-block-paragraph\">Astra is one of the most versatile WordPress themes available today, flexible enough to build almost any website design, including fully custom layouts. But Astra isn\u2019t just a design tool.<\/p>\n<p class=\"wp-block-paragraph\">Bundled inside Astra Pro is a feature called Site Builder, and part of it, the Hooks Layout, gives you a built-in way to add and manage third-party and custom code, such as tracking pixels, analytics tags, marketing, and verification scripts.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">Instead of installing another WordPress plugin just to place a script in your website header or footer, you can handle it directly inside the Astra Site Builder.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">In this guide, we\u2019ll focus specifically on that use case: adding and managing scripts with Astra Site Builder. We won\u2019t cover every Site Builder feature or use case (you can learn that on Astra\u2019s own Site Builder overview page), just the part that matters for script management.\u00a0<\/p>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What-Is-Astra-Site-Builders-Hook-Feature\"\/>What Is Astra Site Builder\u2019s Hook Feature?<span class=\"ez-toc-section-end\"\/><\/h2>\n<p class=\"wp-block-paragraph\">Site Builder is a premium feature in <a href=\"https:\/\/cybernaira.com\/recommends\/astra\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Astra Pro<\/a> that lets you build custom headers, footers, single post and page templates, archive pages, <a href=\"https:\/\/cybernaira.com\/create-custom-404-pages\/\" data-type=\"post\" data-id=\"43339\" target=\"_blank\" rel=\"noreferrer noopener\">404 pages<\/a>, and more, all without writing code. One of its layout types, Hooks, is designed to insert content at specific points across your site.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">That\u2019s the part we\u2019re using here.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">Hooks work inside the WordPress blocks editor and the code editor, so they\u2019re compatible with most popular page builders, including Elementor, Spectra, and Kadence Blocks.<\/p>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why-Use-Hooks-Instead-of-a-Basic-Code-Snippet-Plugin\"\/>Why Use Hooks Instead of a Basic Code Snippet Plugin?\u00a0<span class=\"ez-toc-section-end\"\/><\/h2>\n<p class=\"wp-block-paragraph\">Plenty of plugins let you paste a script into your header and footer. What sets Astra Site Builder apart is the level of control you get over where, when, and whom that script loads.\u00a0<\/p>\n<div class=\"wp-block-kadence-iconlist kt-svg-icon-list-items kt-svg-icon-list-items52733_fa0cb4-3d kt-svg-icon-list-columns-1 alignnone kt-list-icon-aligntop\">\n<ul class=\"kt-svg-icon-list\">\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_89a755-0e\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Precise placement using a dozen predefined hook locations, not just the header or footer.\u00a0<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_b5312d-17\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Page-level and post-type level targeting, so a script can load only where it\u2019s actually needed<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_c0f1ff-f5\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">User role exclusion, so you can keep admin activity out of your analytics data<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_937bb4-2d\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Device-based targeting, so a script only fires on the device types you choose<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_098e3b-bd\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">A start and end date, useful for scripts tied to a time-limited campaign<\/span><\/li>\n<\/ul>\n<\/div>\n<p class=\"wp-block-paragraph\">None of that requires touching your theme files or hiring a developer.<\/p>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Before-Your-Start\"\/>Before Your Start<span class=\"ez-toc-section-end\"\/><\/h2>\n<p class=\"wp-block-paragraph\">You\u2019ll need the <a href=\"https:\/\/cybernaira.com\/recommends\/astra\/\" target=\"_blank\" rel=\"noreferrer noopener\">Astra Pro plugin<\/a> active with a valid licence, since Site Builder is part of Astra\u2019s premium feature set. The free Astra theme doesn\u2019t include it.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">If you\u2019re still deciding whether it\u2019s worth upgrading, our <a href=\"https:\/\/cybernaira.com\/astra-theme-review\/\" target=\"_blank\" rel=\"noreferrer noopener\">full Astra Pro review<\/a> covers what you get for the price, and if you haven\u2019t settled on a theme yet, <a href=\"https:\/\/cybernaira.com\/kadence-vs-astra-theme\/\" target=\"_blank\" rel=\"noreferrer noopener\">our Astra vs Kadence comparison<\/a> is a good starting point.<\/p>\n<p class=\"wp-block-paragraph\">We\u2019ve also covered\u00a0a <a href=\"https:\/\/cybernaira.com\/astra-pro-vs-astra-free-theme\/\" target=\"_blank\" rel=\"noreferrer noopener\">full comparison of Astra free vs Pro<\/a>, if that helps you make the right decision.<\/p>\n<h3 class=\"wp-block-heading\">Step 1: Open Site Builder<\/h3>\n<p class=\"wp-block-paragraph\">If you\u2019re activating Astra Pro for the first time, go to the Astra dashboard, scroll to the\u00a0Astra Pro Modules\u00a0section, and ensure the Site Builder toggle is on. Once enabled, the Site Builder features are accessible. <\/p>\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"637\" alt=\"Astra Pro theme options dashboard with red rectangle highlighting Site Builder module toggle enabled.\" class=\"wp-image-52753\" title=\"enable site builder module in astra pro settings\" srcset=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-site-builder-module-in-astra-pro-settings-1024x637.png 1024w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-site-builder-module-in-astra-pro-settings-300x187.png 300w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-site-builder-module-in-astra-pro-settings-768x478.png 768w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-site-builder-module-in-astra-pro-settings.png 1128w\" data-lazy-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-site-builder-module-in-astra-pro-settings-1024x637.png\"\/><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"637\" src=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-site-builder-module-in-astra-pro-settings-1024x637.png\" alt=\"Astra Pro theme options dashboard with red rectangle highlighting Site Builder module toggle enabled.\" class=\"wp-image-52753\" title=\"enable site builder module in astra pro settings\" srcset=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-site-builder-module-in-astra-pro-settings-1024x637.png 1024w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-site-builder-module-in-astra-pro-settings-300x187.png 300w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-site-builder-module-in-astra-pro-settings-768x478.png 768w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-site-builder-module-in-astra-pro-settings.png 1128w\" sizes=\"(max-width: 1024px) 100vw, 1024px\"\/><\/figure>\n<p class=\"wp-block-paragraph\">You can click Settings (in the toggle button)to open Site Builder directly, or from your WordPress dashboard, hover over Astra in the left sidebar, then click Site Builder.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">Either option takes you to Step 2. <\/p>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"498\" alt=\"WordPress dashboard showing the Astra menu with the Site Builder option highlighted.\" class=\"wp-image-52737\" title=\"access astra site builder wordpress\" srcset=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/access-astra-site-builder-wordpress-1024x498.png 1024w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/access-astra-site-builder-wordpress-300x146.png 300w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/access-astra-site-builder-wordpress-768x374.png 768w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/access-astra-site-builder-wordpress.png 1325w\" data-lazy-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/access-astra-site-builder-wordpress-1024x498.png\"\/><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"498\" src=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/access-astra-site-builder-wordpress-1024x498.png\" alt=\"WordPress dashboard showing the Astra menu with the Site Builder option highlighted.\" class=\"wp-image-52737\" title=\"access astra site builder wordpress\" srcset=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/access-astra-site-builder-wordpress-1024x498.png 1024w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/access-astra-site-builder-wordpress-300x146.png 300w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/access-astra-site-builder-wordpress-768x374.png 768w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/access-astra-site-builder-wordpress.png 1325w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\"\/><\/figure>\n<h3 class=\"wp-block-heading\">Step 2: Select the Hooks Layout<\/h3>\n<p class=\"wp-block-paragraph\">Site Builder opens in a panel showing the available layout types under Website Parts: Header, Footer, Hooks, Inside Post\/Page, Single, Archive, and 404 page.\u00a0<\/p>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"587\" alt=\"Astra Site Builder layout dashboard with red arrow pointing to Hooks option under website parts menu,\" class=\"wp-image-52738\" title=\"astra site builder layouts hooks option\" srcset=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-site-builder-layouts-hooks-option-1024x587.png 1024w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-site-builder-layouts-hooks-option-300x172.png 300w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-site-builder-layouts-hooks-option-768x440.png 768w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-site-builder-layouts-hooks-option-1536x881.png 1536w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-site-builder-layouts-hooks-option.png 1920w\" data-lazy-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-site-builder-layouts-hooks-option-1024x587.png\"\/><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"587\" src=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-site-builder-layouts-hooks-option-1024x587.png\" alt=\"Astra Site Builder layout dashboard with red arrow pointing to Hooks option under website parts menu,\" class=\"wp-image-52738\" title=\"astra site builder layouts hooks option\" srcset=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-site-builder-layouts-hooks-option-1024x587.png 1024w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-site-builder-layouts-hooks-option-300x172.png 300w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-site-builder-layouts-hooks-option-768x440.png 768w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-site-builder-layouts-hooks-option-1536x881.png 1536w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-site-builder-layouts-hooks-option.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\"\/><\/figure>\n<p class=\"wp-block-paragraph\">Since we\u2019re managing scripts, click Hooks.\u00a0<\/p>\n<h3 class=\"wp-block-heading\">Step 3: Enable the Code Editor<\/h3>\n<p class=\"wp-block-paragraph\">A new Hook entry opens in the standard WordPress block editor, with a title field and an Enable Code Editor button in the top toolbar. Click it.\u00a0<\/p>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" alt=\"WordPress block editor interface with red arrow pointing to Enable Code Editor button in top toolbar.\" class=\"wp-image-52739\" title=\"enable code editor button wordpress block editor\" srcset=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-code-editor-button-wordpress-block-editor-1024x550.png 1024w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-code-editor-button-wordpress-block-editor-300x161.png 300w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-code-editor-button-wordpress-block-editor-768x413.png 768w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-code-editor-button-wordpress-block-editor-1536x826.png 1536w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-code-editor-button-wordpress-block-editor.png 1920w\" data-lazy-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-code-editor-button-wordpress-block-editor-1024x550.png\"\/><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-code-editor-button-wordpress-block-editor-1024x550.png\" alt=\"WordPress block editor interface with red arrow pointing to Enable Code Editor button in top toolbar.\" class=\"wp-image-52739\" title=\"enable code editor button wordpress block editor\" srcset=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-code-editor-button-wordpress-block-editor-1024x550.png 1024w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-code-editor-button-wordpress-block-editor-300x161.png 300w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-code-editor-button-wordpress-block-editor-768x413.png 768w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-code-editor-button-wordpress-block-editor-1536x826.png 1536w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/enable-code-editor-button-wordpress-block-editor.png 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\"\/><\/figure>\n<p class=\"wp-block-paragraph\">WordPress may show you a pop-up asking if you want to leave the page. This is just WordPress confirming you meant to exit the block editor. Click Leave to continue.\u00a0<\/p>\n<h3 class=\"wp-block-heading\">Step 4: Name Your Entry and Add the Script<\/h3>\n<p class=\"wp-block-paragraph\">You\u2019re now in the code editor; give the entry a clear, descriptive title (something like GA4 Tracking Script or Meta Pixel) so you can identify each script later. Next, paste your script into the code editor area, replacing the placeholder text.<\/p>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"369\" alt=\"Astra code editor interface displaying Enable WordPress Editor button title input and snippet text box.\" class=\"wp-image-52742\" title=\"astra theme code editor interface wordpress\" srcset=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-theme-code-editor-interface-wordpress-1024x369.png 1024w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-theme-code-editor-interface-wordpress-300x108.png 300w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-theme-code-editor-interface-wordpress-768x277.png 768w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-theme-code-editor-interface-wordpress-1536x553.png 1536w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-theme-code-editor-interface-wordpress.png 1902w\" data-lazy-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-theme-code-editor-interface-wordpress-1024x369.png\"\/><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"369\" src=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-theme-code-editor-interface-wordpress-1024x369.png\" alt=\"Astra code editor interface displaying Enable WordPress Editor button title input and snippet text box.\" class=\"wp-image-52742\" title=\"astra theme code editor interface wordpress\" srcset=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-theme-code-editor-interface-wordpress-1024x369.png 1024w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-theme-code-editor-interface-wordpress-300x108.png 300w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-theme-code-editor-interface-wordpress-768x277.png 768w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-theme-code-editor-interface-wordpress-1536x553.png 1536w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-theme-code-editor-interface-wordpress.png 1902w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\"\/><\/figure>\n<p class=\"wp-block-paragraph\">Don\u2019t hit publish yet. The settings below the code editor are what make this feature genuinely useful for managing scripts, so it\u2019s worth understanding each one before you go live.\u00a0<\/p>\n<h3 class=\"wp-block-heading\">Step 5: Configure the Custom Layout Settings<\/h3>\n<p class=\"wp-block-paragraph\">Scroll down to the Custom Layout Settings panel. Here\u2019s what each field controls.<\/p>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"876\" alt=\"Astra custom layout settings meta box showing hooks configuration fields display rules user roles and responsive visibility checkboxes.\" class=\"wp-image-52743\" title=\"astra custom layout settings meta box\" srcset=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-custom-layout-settings-meta-box-1024x876.png 1024w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-custom-layout-settings-meta-box-300x257.png 300w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-custom-layout-settings-meta-box-768x657.png 768w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-custom-layout-settings-meta-box.png 1317w\" data-lazy-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-custom-layout-settings-meta-box-1024x876.png\"\/><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"876\" src=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-custom-layout-settings-meta-box-1024x876.png\" alt=\"Astra custom layout settings meta box showing hooks configuration fields display rules user roles and responsive visibility checkboxes.\" class=\"wp-image-52743\" title=\"astra custom layout settings meta box\" srcset=\"https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-custom-layout-settings-meta-box-1024x876.png 1024w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-custom-layout-settings-meta-box-300x257.png 300w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-custom-layout-settings-meta-box-768x657.png 768w, https:\/\/cybernaira.com\/wp-content\/uploads\/2026\/08\/astra-custom-layout-settings-meta-box.png 1317w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\"\/><\/figure>\n<h4 class=\"wp-block-heading\">Layout and Action<\/h4>\n<p class=\"wp-block-paragraph\">You need to select Hooks again from the Layout dropdown options, since you\u2019ve exited the standard Gutenberg Editor. The Code Editor page defaults to the first Layout option.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">The Action dropdown is where you choose exactly which hook location the script should load into. Options are grouped by selection, depending on your WordPress stack (WooCommerce, for example), including:<\/p>\n<div class=\"wp-block-kadence-iconlist kt-svg-icon-list-items kt-svg-icon-list-items52733_47446d-9a kt-svg-icon-list-columns-1 alignnone\">\n<ul class=\"kt-svg-icon-list\">\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_b9d4b0-1b\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\"><strong>Head:<\/strong> Before HTML, Head Top, Head Bottom, WP Head.<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_cb664f-2c\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\"><strong>Header:<\/strong> Body Top, Before Header, Masterhead Top, After Header, and more<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_5539b5-09\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\"><strong>Content:<\/strong> Before Content, Templates part, Before Content, After Content, and more<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_aa9b7f-0c\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\"><strong>WooCommerce:<\/strong> Global sections, Checkout Templates, Product Templates, Cart, and Account Templates.\u00a0<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_edd052-a5\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\"><strong>Footer:<\/strong> Above Footer, Below Footer, Footer Container, WP Footer, and more.\u00a0<\/span><\/li>\n<\/ul>\n<\/div>\n<p class=\"wp-block-paragraph\">Other groups include Sidebar and Comment, plus a Custom Hooks option for developers who want to target a specific hook by name using the Custom Hook Name field.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">Each one gives you several content sections or template parts to hook your script into.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">For most tracking and analytics scripts, WP Head (under the Head group) is the right choice. It\u2019s the standard location for scripts like <a href=\"https:\/\/analytics.google.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Google Analytics<\/a>, <a href=\"https:\/\/tagmanager.google.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Google Tag Manager<\/a>, and most verification tags.<\/p>\n<h4 class=\"wp-block-heading\">Priority<\/h4>\n<p class=\"wp-block-paragraph\">Priority controls the load order when multiple hooks target the same location. It defaults to 10. Lower numbers load earlier.<\/p>\n<p class=\"wp-block-paragraph\">You generally don\u2019t need to change this unless a script depends on another script loading first (for example, a tag manager container loading a tag that references it).\u00a0<\/p>\n<h4 class=\"wp-block-heading\">Spacing<\/h4>\n<p class=\"wp-block-paragraph\">Top and bottom spacing settings add visual padding around whatever the hook inserts. For scripts specifically, this typically stays at 0, since you\u2019re not inserting visible content.\u00a0<\/p>\n<h4 class=\"wp-block-heading\">Display On<\/h4>\n<p class=\"wp-block-paragraph\">This controls which pages the script fires on. Instead of loading a script sitewide by default, you can scope it to what you need: Entire Website, All Singular posts, All Archives, or something more specific under <strong>Special pages<\/strong> (404 Page, Search Page. Blog\/Posts Page, Front Page, Date Archive, Author Archive) <strong>Post<\/strong> (All Posts, All Posts Archives, Categories, Tags), <strong>Pages<\/strong>, and any custom post type registered on your site.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">Use Add Display Rule to include additional targets, or Add Exclusion Rule to exclude specific pages, which is useful if you want a script running everywhere except one or two pages.<\/p>\n<h4 class=\"wp-block-heading\">User Roles<\/h4>\n<p class=\"wp-block-paragraph\">These settings let you control which logged-in user roles trigger the script, with options ranging from All, Logged in, and Logged Out, up through roles like Administrator, Editor, Author, Contributor, and Subscribers.<\/p>\n<p class=\"wp-block-paragraph\">This one matters more than it looks. If you\u2019re <a href=\"https:\/\/cybernaira.com\/add-google-analytics-astra\/\" target=\"_blank\" rel=\"noreferrer noopener\">adding an analytics script like GA4<\/a>, you probably don\u2019t want your own admin visits skewing the data. Setting this to exclude Administrator (or restrict it to Logged-out visitors) keeps your new traffic out of the numbers. Use Add User Rule if you need to combine more than one condition.<\/p>\n<h4 class=\"wp-block-heading\">Responsive Visibility\u00a0<\/h4>\n<p class=\"wp-block-paragraph\">Checkboxes for Desktop, Tablet, and Mobile let you control which device type loads the script. This is useful for a script tied to go a so effective ad placement of a mobile-only or desktop-only campaign.\u00a0<\/p>\n<h4 class=\"wp-block-heading\">Time Duration<\/h4>\n<p class=\"wp-block-paragraph\">If a script is only relevant for a limited window, such as a marketing campaign or a temporary traffic source test, enable Time Duration and set a start and end date and time, down to the seconds, in your site\u2019s timezone.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">Once the end date passes, the script automatically stops loading, so you don\u2019t have to remember to remove it annually.\u00a0<\/p>\n<h4 class=\"wp-block-heading\">Step 6: Publish<\/h4>\n<p class=\"wp-block-paragraph\">Once your settings are configured, click Publish. The script will now load according to the rules you set, without any manual edits to your theme\u2019s header or footer files.\u00a0<\/p>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Common-Scripts-You-Can-Manage-This-Way\"\/>Common Scripts You Can Manage This Way<span class=\"ez-toc-section-end\"\/><\/h2>\n<p class=\"wp-block-paragraph\">Atra Site Builder\u2019s Hooks feature works well for most third-party code you\u2019d otherwise insert manually, including:<\/p>\n<div class=\"wp-block-kadence-iconlist kt-svg-icon-list-items kt-svg-icon-list-items52733_cda588-d4 kt-svg-icon-list-columns-1 alignnone kt-list-icon-aligntop\">\n<ul class=\"kt-svg-icon-list\">\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_87c7cc-4c\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Google Analytics (GA4) and Google Tag Manager<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_0d1a1a-67\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Meta Pixel and other ad platform tracking codes<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_2a7380-23\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">AdSense verification and ad code<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_27ea56-a0\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Custom CSS tags (Google Search Console, Bing Webmaster Tools, Pinterest)<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_a45546-f7\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Custom CSS or JavaScript for specific pages or campaigns<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_e1a499-a4\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Custom text\/content into your site pages and posts<\/span><\/li>\n<\/ul>\n<\/div>\n<p class=\"wp-block-paragraph\">Several of these, especially Meta Pixel and conversion tracking, tie directly into\u00a0<a href=\"https:\/\/cybernaira.com\/optimize-wordpress-for-lead-generation\/\" target=\"_blank\" rel=\"noreferrer noopener\">optimizing your site for lead generation<\/a>, so it\u2019s worth setting them up correctly from the start rather than retrofitting them later.<\/p>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Best-Practices-for-Managing-Scripts-with-Astra-Site-Builder\"\/>Best Practices for Managing Scripts with Astra Site Builder<span class=\"ez-toc-section-end\"\/><\/h2>\n<div class=\"wp-block-kadence-iconlist kt-svg-icon-list-items kt-svg-icon-list-items52733_2fe833-3f kt-svg-icon-list-columns-1 alignnone kt-list-icon-aligntop\">\n<ul class=\"kt-svg-icon-list\">\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_dffcdc-c4\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Give each entry a clear, specific name. \u201cGA4 Tracking script\u201d is far easier to manage later than \u201cUntitled\u201d or \u201cScript 1\u201d<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_c50d65-61\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Scope the script to only the pages that need it instead of defaulting to the entire website.<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_4c76e8-e8\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">This keeps page load lean and avoids script firing where they\u2019re not needed.<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_82b47a-16\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Exclude Administrator or logged-in traffic from analytics and pixel script so your new visit doesn\u2019t pollute the data<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_0281b8-33\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Use Time Duration for anything campaign-specific instead if leaving the old tracking script running indefinitely<\/span><\/li>\n<li class=\"wp-block-kadence-listitem kt-svg-icon-list-item-wrap kt-svg-icon-list-item-52733_f2a99f-3c\"><span class=\"kb-svg-icon-wrap kb-svg-icon-fas_check-circle kt-svg-icon-list-single\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z\"\/><\/svg><\/span><span class=\"kt-svg-icon-list-text\">Keep a short list of what each entry does, especially if you manage multiple sites, since Hook entries can accumulate over time.<\/span><\/li>\n<\/ul>\n<\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"FAQs\"\/>FAQs<span class=\"ez-toc-section-end\"\/><\/h2>\n<div class=\"wp-block-uagb-faq uagb-faq__outer-wrap uagb-block-f5f64ce3 uagb-faq-icon-row uagb-faq-layout-accordion uagb-faq-expand-first-true uagb-faq-inactive-other-true uagb-faq__wrap uagb-buttons-layout-wrap uagb-faq-equal-height     \" data-faqtoggle=\"true\" role=\"tablist\">\n<div class=\"wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-faq-item uagb-block-c724f1a8 \" role=\"tab\" tabindex=\"0\">\n<div class=\"uagb-faq-questions-button uagb-faq-questions\">\t\t\t<span class=\"uagb-icon uagb-faq-icon-wrap\"><br \/>\n\t\t\t\t\t\t\t\t<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 448 512\"><path d=\"M432 256c0 17.69-14.33 32.01-32 32.01H256v144c0 17.69-14.33 31.99-32 31.99s-32-14.3-32-31.99v-144H48c-17.67 0-32-14.32-32-32.01s14.33-31.99 32-31.99H192v-144c0-17.69 14.33-32.01 32-32.01s32 14.32 32 32.01v144h144C417.7 224 432 238.3 432 256z\"\/><\/svg><br \/>\n\t\t\t\t\t\t\t<\/span><br \/>\n\t\t\t\t\t\t<span class=\"uagb-icon-active uagb-faq-icon-wrap\"><br \/>\n\t\t\t\t\t\t\t\t<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 448 512\"><path d=\"M400 288h-352c-17.69 0-32-14.32-32-32.01s14.31-31.99 32-31.99h352c17.69 0 32 14.3 32 31.99S417.7 288 400 288z\"\/><\/svg><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<h3 class=\"uagb-question\">Do I need a separate plugging to add a script if I\u2019m using Astra Pro?<\/h3>\n<\/div>\n<div class=\"uagb-faq-content\">\n<p>No, If you already have <a href=\"https:\/\/cybernaira.com\/recommends\/astra\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Astra Pro active<\/a>, Site Builder\u2019s Hooks feature covers script placement and management without needing a dedicated header and footer plugin.<\/p>\n<\/div>\n<\/div>\n<div class=\"wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-faq-item uagb-block-79f5849c \" role=\"tab\" tabindex=\"0\">\n<div class=\"uagb-faq-questions-button uagb-faq-questions\">\t\t\t<span class=\"uagb-icon uagb-faq-icon-wrap\"><br \/>\n\t\t\t\t\t\t\t\t<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 448 512\"><path d=\"M432 256c0 17.69-14.33 32.01-32 32.01H256v144c0 17.69-14.33 31.99-32 31.99s-32-14.3-32-31.99v-144H48c-17.67 0-32-14.32-32-32.01s14.33-31.99 32-31.99H192v-144c0-17.69 14.33-32.01 32-32.01s32 14.32 32 32.01v144h144C417.7 224 432 238.3 432 256z\"\/><\/svg><br \/>\n\t\t\t\t\t\t\t<\/span><br \/>\n\t\t\t\t\t\t<span class=\"uagb-icon-active uagb-faq-icon-wrap\"><br \/>\n\t\t\t\t\t\t\t\t<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 448 512\"><path d=\"M400 288h-352c-17.69 0-32-14.32-32-32.01s14.31-31.99 32-31.99h352c17.69 0 32 14.3 32 31.99S417.7 288 400 288z\"\/><\/svg><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<h3 class=\"uagb-question\">Is Astra Site Builder available on the free Astra version?<\/h3>\n<\/div>\n<div class=\"uagb-faq-content\">\n<p>No, Site Builder, including the Hook Layout feature, is only available with a paid license.<\/p>\n<\/div>\n<\/div>\n<div class=\"wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-faq-item uagb-block-e274385d \" role=\"tab\" tabindex=\"0\">\n<div class=\"uagb-faq-questions-button uagb-faq-questions\">\t\t\t<span class=\"uagb-icon uagb-faq-icon-wrap\"><br \/>\n\t\t\t\t\t\t\t\t<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 448 512\"><path d=\"M432 256c0 17.69-14.33 32.01-32 32.01H256v144c0 17.69-14.33 31.99-32 31.99s-32-14.3-32-31.99v-144H48c-17.67 0-32-14.32-32-32.01s14.33-31.99 32-31.99H192v-144c0-17.69 14.33-32.01 32-32.01s32 14.32 32 32.01v144h144C417.7 224 432 238.3 432 256z\"\/><\/svg><br \/>\n\t\t\t\t\t\t\t<\/span><br \/>\n\t\t\t\t\t\t<span class=\"uagb-icon-active uagb-faq-icon-wrap\"><br \/>\n\t\t\t\t\t\t\t\t<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 448 512\"><path d=\"M400 288h-352c-17.69 0-32-14.32-32-32.01s14.31-31.99 32-31.99h352c17.69 0 32 14.3 32 31.99S417.7 288 400 288z\"\/><\/svg><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<h3 class=\"uagb-question\">Where can I add GA4 and Google Tag Manager Code?<\/h3>\n<\/div>\n<div class=\"uagb-faq-content\">\n<p>Set the Action to WP Head under the Head Group. That places the script in your site\u2019s head section, which is the standard location these scripts expect.<\/p>\n<\/div>\n<\/div>\n<div class=\"wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-faq-item uagb-block-63788fa4 \" role=\"tab\" tabindex=\"0\">\n<div class=\"uagb-faq-questions-button uagb-faq-questions\">\t\t\t<span class=\"uagb-icon uagb-faq-icon-wrap\"><br \/>\n\t\t\t\t\t\t\t\t<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 448 512\"><path d=\"M432 256c0 17.69-14.33 32.01-32 32.01H256v144c0 17.69-14.33 31.99-32 31.99s-32-14.3-32-31.99v-144H48c-17.67 0-32-14.32-32-32.01s14.33-31.99 32-31.99H192v-144c0-17.69 14.33-32.01 32-32.01s32 14.32 32 32.01v144h144C417.7 224 432 238.3 432 256z\"\/><\/svg><br \/>\n\t\t\t\t\t\t\t<\/span><br \/>\n\t\t\t\t\t\t<span class=\"uagb-icon-active uagb-faq-icon-wrap\"><br \/>\n\t\t\t\t\t\t\t\t<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 448 512\"><path d=\"M400 288h-352c-17.69 0-32-14.32-32-32.01s14.31-31.99 32-31.99h352c17.69 0 32 14.3 32 31.99S417.7 288 400 288z\"\/><\/svg><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<h3 class=\"uagb-question\">Can I stop a script from loading on a specific page?<\/h3>\n<\/div>\n<div class=\"uagb-faq-content\">\n<p>Yes, use the Display On setting\u2019s Add Exclusion Rule option to exclude specific pages, post, or post type while keeping the script active everywhere else.\u00a0<\/p>\n<\/div>\n<\/div>\n<div class=\"wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-faq-item uagb-block-e6c44e8e \" role=\"tab\" tabindex=\"0\">\n<div class=\"uagb-faq-questions-button uagb-faq-questions\">\t\t\t<span class=\"uagb-icon uagb-faq-icon-wrap\"><br \/>\n\t\t\t\t\t\t\t\t<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 448 512\"><path d=\"M432 256c0 17.69-14.33 32.01-32 32.01H256v144c0 17.69-14.33 31.99-32 31.99s-32-14.3-32-31.99v-144H48c-17.67 0-32-14.32-32-32.01s14.33-31.99 32-31.99H192v-144c0-17.69 14.33-32.01 32-32.01s32 14.32 32 32.01v144h144C417.7 224 432 238.3 432 256z\"\/><\/svg><br \/>\n\t\t\t\t\t\t\t<\/span><br \/>\n\t\t\t\t\t\t<span class=\"uagb-icon-active uagb-faq-icon-wrap\"><br \/>\n\t\t\t\t\t\t\t\t<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 448 512\"><path d=\"M400 288h-352c-17.69 0-32-14.32-32-32.01s14.31-31.99 32-31.99h352c17.69 0 32 14.3 32 31.99S417.7 288 400 288z\"\/><\/svg><br \/>\n\t\t\t\t\t\t\t<\/span><\/p>\n<h3 class=\"uagb-question\">Should I add verification and tracking scripts as part of my SEO process?<\/h3>\n<\/div>\n<div class=\"uagb-faq-content\">\n<p>Yes, SIte verification tags and analytics are foundational, and worth treating as part of a broader <a href=\"https:\/\/cybernaira.com\/on-page-seo-checklist\/\" target=\"_blank\" rel=\"noreferrer noopener\">on-page SEO checklist<\/a> rather than a one-off task you set up once and forget. <\/p>\n<\/div>\n<\/div>\n<\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"\/>Conclusion<span class=\"ez-toc-section-end\"\/><\/h2>\n<p class=\"wp-block-paragraph\">Astra Site Builder\u2019s Hooks feature turns script management into something you control with settings instead of manual code edits.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">Between hook placement. Page targeting, user role exclusion, device targeting, and schedule start and end dates, it covers most of what a dedicated code snippet plugin would offer, without adding another plugin to your site.\u00a0<\/p>\n<\/p><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Astra is one of the most versatile WordPress themes available today, flexible enough to build almost any website design, including fully custom layouts. But Astra isn\u2019t just a design tool. Bundled inside Astra Pro is a feature called Site Builder, and part of it, the Hooks Layout, gives you a built-in way to add and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7048242,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[210873,111139,97709,210874],"tags":[16353,46924,8136,834,2706,22228,25040,7476],"dealstore":[],"offerexpiration":[],"class_list":["post-7048241","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-astra","category-blogging","category-pro","category-site-builder","tag-add","tag-astra","tag-builder","tag-custom","tag-hooks","tag-layout","tag-scripts","tag-site"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Add Custom Scripts With Astra Site Builder Hooks Layout - Som2ny Network<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fivemor.com\/?p=7048241\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add Custom Scripts With Astra Site Builder Hooks Layout - Som2ny Network\" \/>\n<meta property=\"og:description\" content=\"Astra is one of the most versatile WordPress themes available today, flexible enough to build almost any website design, including fully custom layouts. But Astra isn\u2019t just a design tool. Bundled inside Astra Pro is a feature called Site Builder, and part of it, the Hooks Layout, gives you a built-in way to add and [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fivemor.com\/?p=7048241\" \/>\n<meta property=\"og:site_name\" content=\"Som2ny Network\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-26T07:47:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/add-custom-scripts-astra-site-builder-hooks.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1365\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fivemor.com\/?p=7048241#article\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/?p=7048241\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\"},\"headline\":\"How to Add Custom Scripts With Astra Site Builder Hooks Layout\",\"datePublished\":\"2026-08-26T07:47:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=7048241\"},\"wordCount\":1811,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=7048241#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/add-custom-scripts-astra-site-builder-hooks.jpg\",\"keywords\":[\"Add\",\"Astra\",\"Builder\",\"Custom\",\"Hooks\",\"layout\",\"Scripts\",\"SITE\"],\"articleSection\":[\"Astra\",\"Blogging\",\"pro\",\"site builder\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fivemor.com\/?p=7048241#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fivemor.com\/?p=7048241\",\"url\":\"https:\/\/fivemor.com\/?p=7048241\",\"name\":\"How to Add Custom Scripts With Astra Site Builder Hooks Layout - Som2ny Network\",\"isPartOf\":{\"@id\":\"https:\/\/fivemor.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/fivemor.com\/?p=7048241#primaryimage\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/?p=7048241#primaryimage\"},\"thumbnailUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/add-custom-scripts-astra-site-builder-hooks.jpg\",\"datePublished\":\"2026-08-26T07:47:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fivemor.com\/?p=7048241#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fivemor.com\/?p=7048241\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/?p=7048241#primaryimage\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/add-custom-scripts-astra-site-builder-hooks.jpg\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/add-custom-scripts-astra-site-builder-hooks.jpg\",\"width\":1365,\"height\":768},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fivemor.com\/?p=7048241#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/fivemor.com\/?bp_activities=1\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add Custom Scripts With Astra Site Builder Hooks Layout\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fivemor.com\/#website\",\"url\":\"https:\/\/fivemor.com\/\",\"name\":\"Som2ny Network\",\"description\":\"Daily Deals\",\"publisher\":{\"@id\":\"https:\/\/fivemor.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fivemor.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/fivemor.com\/#organization\",\"name\":\"Som2ny Network\",\"url\":\"https:\/\/fivemor.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"contentUrl\":\"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png\",\"width\":300,\"height\":86,\"caption\":\"Som2ny Network\"},\"image\":{\"@id\":\"https:\/\/fivemor.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/fivemor.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/fivemor.com\"],\"url\":\"https:\/\/fivemor.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Add Custom Scripts With Astra Site Builder Hooks Layout - Som2ny Network","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fivemor.com\/?p=7048241","og_locale":"en_US","og_type":"article","og_title":"How to Add Custom Scripts With Astra Site Builder Hooks Layout - Som2ny Network","og_description":"Astra is one of the most versatile WordPress themes available today, flexible enough to build almost any website design, including fully custom layouts. But Astra isn\u2019t just a design tool. Bundled inside Astra Pro is a feature called Site Builder, and part of it, the Hooks Layout, gives you a built-in way to add and [&hellip;]","og_url":"https:\/\/fivemor.com\/?p=7048241","og_site_name":"Som2ny Network","article_published_time":"2026-08-26T07:47:04+00:00","og_image":[{"width":1365,"height":768,"url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/add-custom-scripts-astra-site-builder-hooks.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fivemor.com\/?p=7048241#article","isPartOf":{"@id":"https:\/\/fivemor.com\/?p=7048241"},"author":{"name":"admin","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371"},"headline":"How to Add Custom Scripts With Astra Site Builder Hooks Layout","datePublished":"2026-08-26T07:47:04+00:00","mainEntityOfPage":{"@id":"https:\/\/fivemor.com\/?p=7048241"},"wordCount":1811,"commentCount":0,"publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"image":{"@id":"https:\/\/fivemor.com\/?p=7048241#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/add-custom-scripts-astra-site-builder-hooks.jpg","keywords":["Add","Astra","Builder","Custom","Hooks","layout","Scripts","SITE"],"articleSection":["Astra","Blogging","pro","site builder"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fivemor.com\/?p=7048241#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fivemor.com\/?p=7048241","url":"https:\/\/fivemor.com\/?p=7048241","name":"How to Add Custom Scripts With Astra Site Builder Hooks Layout - Som2ny Network","isPartOf":{"@id":"https:\/\/fivemor.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fivemor.com\/?p=7048241#primaryimage"},"image":{"@id":"https:\/\/fivemor.com\/?p=7048241#primaryimage"},"thumbnailUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/add-custom-scripts-astra-site-builder-hooks.jpg","datePublished":"2026-08-26T07:47:04+00:00","breadcrumb":{"@id":"https:\/\/fivemor.com\/?p=7048241#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fivemor.com\/?p=7048241"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/?p=7048241#primaryimage","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/add-custom-scripts-astra-site-builder-hooks.jpg","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/08\/add-custom-scripts-astra-site-builder-hooks.jpg","width":1365,"height":768},{"@type":"BreadcrumbList","@id":"https:\/\/fivemor.com\/?p=7048241#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fivemor.com\/?bp_activities=1"},{"@type":"ListItem","position":2,"name":"How to Add Custom Scripts With Astra Site Builder Hooks Layout"}]},{"@type":"WebSite","@id":"https:\/\/fivemor.com\/#website","url":"https:\/\/fivemor.com\/","name":"Som2ny Network","description":"Daily Deals","publisher":{"@id":"https:\/\/fivemor.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fivemor.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/fivemor.com\/#organization","name":"Som2ny Network","url":"https:\/\/fivemor.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/","url":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","contentUrl":"https:\/\/fivemor.com\/wp-content\/uploads\/2026\/07\/4a0953c4-logo-300x86-1.png","width":300,"height":86,"caption":"Som2ny Network"},"image":{"@id":"https:\/\/fivemor.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/fivemor.com\/#\/schema\/person\/b85e3c3dc0e1daea076524dc8810c371","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/fivemor.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/729ae85bf62b9917e93538db2f2688ca?s=96&r=g&default=https%3A%2F%2Ffivemor.com%2Fwp-content%2Fplugins%2Fbuddypress-first-letter-avatar%2Fimages%2Fdefault%2F96%2Flatin_a.png","caption":"admin"},"sameAs":["https:\/\/fivemor.com"],"url":"https:\/\/fivemor.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/7048241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7048241"}],"version-history":[{"count":0,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/posts\/7048241\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=\/wp\/v2\/media\/7048242"}],"wp:attachment":[{"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7048241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7048241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7048241"},{"taxonomy":"dealstore","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fdealstore&post=7048241"},{"taxonomy":"offerexpiration","embeddable":true,"href":"https:\/\/fivemor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fofferexpiration&post=7048241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}