{"id":252533,"date":"2026-05-06T19:52:02","date_gmt":"2026-05-06T23:52:02","guid":{"rendered":"https:\/\/thegeorgiasun.com\/wpcode\/untitled-snippet-13\/"},"modified":"2026-05-08T23:00:55","modified_gmt":"2026-05-09T03:00:55","slug":"untitled-snippet-13","status":"publish","type":"post","link":"https:\/\/thegeorgiasun.com\/?p=252533","title":{"rendered":"Ezoic Containers"},"content":{"rendered":"<p>(function() {<br \/>\n  \/\/ Watch for Ezoic activating placeholders<br \/>\n  const observer = new MutationObserver(function(mutations) {<br \/>\n    mutations.forEach(function(mutation) {<br \/>\n      const target = mutation.target;<\/p>\n<p>      \/\/ When Ezoic starts adding content to a placeholder<br \/>\n      if (target.id &#038;&#038; target.id.startsWith(&#8216;ezoic-pub-ad-placeholder-&#8216;)) {<\/p>\n<p>        \/\/ Reserve space immediately when content starts loading<br \/>\n        if (target.children.length > 0 &#038;&#038; !target.dataset.sized) {<br \/>\n          target.style.minHeight = &#8216;280px&#8217;;<br \/>\n          target.dataset.sized = &#8216;true&#8217;;<\/p>\n<p>          \/\/ Once ad fully loads, lock to actual height and remove min-height<br \/>\n          const adHeight = target.offsetHeight;<br \/>\n          if (adHeight > 0) {<br \/>\n            target.style.minHeight = adHeight + &#8216;px&#8217;;<br \/>\n          }<br \/>\n        }<br \/>\n      }<br \/>\n    });<br \/>\n  });<\/p>\n<p>  \/\/ Start observing the whole document for placeholder changes<br \/>\n  observer.observe(document.body, {<br \/>\n    childList: true,<br \/>\n    subtree: true,<br \/>\n    attributes: true<br \/>\n  });<br \/>\n})();<\/p>\n","protected":false},"excerpt":{"rendered":"<p>(function() { \/\/ Watch for Ezoic activating placeholders const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { const target = mutation.target; \/\/ When Ezoic starts adding content to a placeholder if (target.id &#038;&#038; target.id.startsWith(&#8216;ezoic-pub-ad-placeholder-&#8216;)) { \/\/ Reserve space immediately when content starts loading if (target.children.length > 0 &#038;&#038; !target.dataset.sized) { target.style.minHeight = &#8216;280px&#8217;; target.dataset.sized = &#8216;true&#8217;; [&hellip;]<\/p>\n","protected":false},"author":948,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"newspack_featured_image_position":"","newspack_post_subtitle":"","newspack_article_summary_title":"Overview:","newspack_article_summary":"","newspack_hide_updated_date":false,"newspack_show_updated_date":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-252533","post","type-post","status-publish","format-standard","hentry","entry"],"_links":{"self":[{"href":"https:\/\/thegeorgiasun.com\/index.php?rest_route=\/wp\/v2\/posts\/252533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thegeorgiasun.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thegeorgiasun.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thegeorgiasun.com\/index.php?rest_route=\/wp\/v2\/users\/948"}],"replies":[{"embeddable":true,"href":"https:\/\/thegeorgiasun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=252533"}],"version-history":[{"count":0,"href":"https:\/\/thegeorgiasun.com\/index.php?rest_route=\/wp\/v2\/posts\/252533\/revisions"}],"wp:attachment":[{"href":"https:\/\/thegeorgiasun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=252533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thegeorgiasun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=252533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thegeorgiasun.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=252533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}