{"id":18245755,"date":"2025-01-15T15:37:29","date_gmt":"2025-01-15T15:37:29","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/loading-after-content\/"},"modified":"2025-01-16T20:31:56","modified_gmt":"2025-01-16T20:31:56","slug":"loading-after-content","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/loading-after-content\/","title":{"rendered":"Loading after content"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I am currently using the Age Gate plugin on my website, but I\u2019m experiencing an issue. The Age Gate does not load as the first element on the site. Instead, the rest of the site content (including scripts and styles) loads first, which defeats the purpose of restricting access to underage users.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, we use <strong>FlyingPress<\/strong> for optimization, including defer and delay for scripts. This may be affecting the loading sequence of the Age Gate. Could you please guide me on how to:<\/p>\n\n\n\n<ol>\n<li>Ensure that the Age Gate loads first, regardless of the FlyingPress optimization settings?<\/li>\n\n\n\n<li>Block or delay other scripts and styles from rendering until the Age Gate confirmation is completed?<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">I\u2019ve attempted the following so far:<\/p>\n\n\n\n<ul>\n<li>Enqueuing the Age Gate scripts and styles as a priority using WordPress hooks.<\/li>\n\n\n\n<li>Using filters to delay other scripts until the Age Gate confirmation.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Despite these attempts, the rest of the content still renders momentarily before the Age Gate appears.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Any guidance, including specific settings for FlyingPress or adjustments to the Age Gate configuration, would be greatly appreciated.<\/p>\n","protected":false},"template":"","class_list":["post-18245755","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18245755","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18245755\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18245755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}