2-minute wp-admin save to move the form above the footer on /contact-us/
After 7 API attempts today (Apr 13), the conclusion is structural: the Code Snippets REST endpoint returns HTTP 200 but silently does not persist UPDATE operations the way wp-admin's save flow does.
44,650 bytes before the API PUT, 44,650 bytes after. The marker string was not found in the persisted code./contact-us/ HTML.add_action('wp_footer', ...) block to the bottom of Snippet #55. Nothing existing is modified./contact-us/ via the is_page gate โ zero impact elsewhere.#shortcode-15-90 (the booking section โ preserves Audrey's designed layout).insertBefore #footer โ guarantees form is at least above the footer.9999 so it runs after every other wp_footer script including Oxygen's late loaders.https://www.callbrightside.com/wp-adminCtrl + End to jump to the end of the code}, 99); or });); or }Ctrl + V into the editor// APR 13 2026: Repositioning retry loop - moves form above footer add_action('wp_footer', function() { if (!is_page('contact-us')) return; echo '<script data-cfasync="false" id="bsp-reposition-retry-apr13">(function(){var moved=false;function moveForm(){if(moved)return true;var form=document.getElementById("bsp-contact-wrapper");if(!form)return false;var primary=document.getElementById("shortcode-15-90");if(primary){if(primary.contains(form)){moved=true;return true;}primary.appendChild(form);form.style.display="block";moved=true;return true;}var footer=document.getElementById("footer");if(footer&&footer.parentNode){footer.parentNode.insertBefore(form,footer);form.style.display="block";moved=true;return true;}return false;}var n=0,max=50;var intId=setInterval(function(){n++;if(moveForm()||n>=max)clearInterval(intId);},300);if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",moveForm);}window.addEventListener("load",function(){setTimeout(moveForm,500);setTimeout(moveForm,1500);setTimeout(moveForm,3000);});})();</script>'; }, 9999);
Ctrl + Shift + N (Chrome) or Ctrl + Shift + P (Firefox)https://www.callbrightside.com/contact-us/Ctrl + U (view source), then Ctrl + F โ search for bsp-reposition-retry-apr13Ctrl + Shift + Del โ select "All time" โ clear everything/contact-us/ in the same incognito windowF12) โ Inspect the #bsp-contact-wrapper element โ copy its parent element ID โ send to Claude for an adjusted selectorForm renders after the footer in source order.
Wrapper position 48,068 > footer position 32,658 = form visually orphaned.
Form sits inside #shortcode-15-90 booking section.
Wrapper rendered inside booking section, both above footer. Layout preserved.
Oxygen Builder renders shortcodes after DOMContentLoaded fires. When our script looks for #shortcode-15-90 at DOMContentLoaded, the element doesn't exist yet. This is why 3 earlier attempts kept failing silently โ no error, just a missing target.
Catches the target element whenever Oxygen finishes rendering โ which can be anywhere from 500ms to 5000ms after load depending on network, images, and other shortcodes. 15 seconds of retries covers every real-world case without blocking the page.
Primary: #shortcode-15-90 preserves Audrey's designed booking section layout.
Secondary: insertBefore #footer ensures that even if the shortcode is renamed or removed, the form is at least not orphaned below the footer.
add_action('wp_footer', ..., 9999) runs LAST in the wp_footer hook chain. This puts our script after all Oxygen late-loading scripts, so when our setInterval starts polling, Oxygen is already doing its work in parallel.
Moving a DOM node with appendChild or insertBefore keeps all attached event listeners intact. Only cloneNode or innerHTML replacement would break GTM tracking. This is why the fix uses direct DOM moves โ every GTM click event on the form keeps firing correctly.
Backup of Snippet #55 (pre-fix) is saved at:
C:\Users\dovew\Documents\Clients\BrightSidePlumbing\backups\snippet_55_pre_apr13_fix.php/opt/nexus/nexus/scripts/output/backups/snippet_55_pre_apr13_fix.phpIf this fix causes a 500 error or the form disappears:
// APR 13 2026 down to }, 9999);)bsp-reposition-retry-apr13 appears in page source, the fix is live and permanent until either Kalen rebuilds /contact-us/ in Oxygen or we migrate to Bricks. No further action needed.