Embed Codes

Add any page to your Wix site.

In the Wix editor, add an Embed a site widget (or an HTML embed), choose Website address, and paste the address below. Each page loads exactly as it looks here, with the menu and footer. Clicking a menu item moves between the pages inside the frame, so visitors stay on your Wix site, and Shop still goes to the Wix shop. The heights shown are starting points; drag the frame taller if a page is cut off.

Menu on every page (one script)

Add this once to your Wix site, in Settings → Custom Code, applied to all pages, and the Branch To Hope menu appears at the top of every page. Keep it in Custom Code, not inside a page element, so deleting an old menu or link in the editor never removes it. Every item opens the full page, and Shop stays in Wix.

<script>
  (function () {
    var SRC = "https://branch-to-hope.base44.app/embed/menu";
    var BAR_ID = "bth-menu-bar";

    function addMenu() {
      if (!document.body) return;
      var existing = document.getElementById(BAR_ID);
      if (existing && existing.isConnected) return;
      if (existing && existing.parentNode) existing.parentNode.removeChild(existing);
      var bar = document.createElement("iframe");
      bar.id = BAR_ID;
      bar.src = SRC;
      bar.title = "Branch To Hope menu";
      bar.setAttribute("scrolling", "no");
      bar.style.cssText =
        "display:block;width:100%;height:64px;border:0;margin:0;position:relative;z-index:9999;";
      document.body.insertBefore(bar, document.body.firstChild);
    }

    function start() {
      if (window.__bthMenuStarted) return;
      window.__bthMenuStarted = true;
      addMenu();

      // On phones the menu opens into a list, so let the bar tell us how tall
      // it needs to be. Without this the list would be cut off at 64px.
      window.addEventListener("message", function (event) {
        var data = event.data;
        if (!data || data.type !== "bth-embed-height") return;
        var bar = document.getElementById(BAR_ID);
        if (!bar) return;
        var height = Math.round(Number(data.height) || 64);
        bar.style.height = Math.max(64, Math.min(640, height)) + "px";
      });

      // Wix re-renders the page after navigation and on reload, which can wipe
      // the bar out of the body. Put it back whenever that happens.
      var queued = false;
      var observer = new MutationObserver(function () {
        if (queued) return;
        queued = true;
        window.requestAnimationFrame(function () {
          queued = false;
          addMenu();
        });
      });
      observer.observe(document.documentElement, { childList: true, subtree: true });

      window.addEventListener("load", addMenu);
      window.addEventListener("popstate", addMenu);
      window.addEventListener("hashchange", addMenu);
      window.addEventListener("wix:page-navigation", addMenu);
      window.setTimeout(addMenu, 800);
      window.setTimeout(addMenu, 2000);
      window.setTimeout(addMenu, 4000);

      // Keep watch: if anything on the page removes the bar, put it straight
      // back. The menu itself lives in Base44, so it should never go missing.
      window.setInterval(addMenu, 1200);
    }

    if (document.body) {
      start();
    } else if (document.readyState === "loading") {
      document.addEventListener("DOMContentLoaded", start);
    } else {
      window.addEventListener("load", start);
    }
  })();
</script>

Wix runs this after the page loads, so the menu sits above your own header. If you would rather place it by hand, use the menu strip below instead.

Menu strip for the Wix shop

Add this one at the very top of your shop and product pages to bring the site menu back. Every item opens the full page, and Shop stays in Wix.

<iframe src="https://branch-to-hope.base44.app/embed/menu" title="Branch To Hope — Menu only" style="width:100%;border:0;height:64px" loading="lazy"></iframe>

Set the widget width to full and its height to about 64px.

<iframe src="https://branch-to-hope.base44.app/" title="Branch To Hope — Home" style="width:100%;border:0;height:4200px" loading="lazy"></iframe>
<iframe src="https://branch-to-hope.base44.app/our-story" title="Branch To Hope — Our Story" style="width:100%;border:0;height:5000px" loading="lazy"></iframe>
<iframe src="https://branch-to-hope.base44.app/pass-it-on" title="Branch To Hope — Pass It On" style="width:100%;border:0;height:1800px" loading="lazy"></iframe>
<iframe src="https://branch-to-hope.base44.app/pass-it-on/partnerships" title="Branch To Hope — Partnerships" style="width:100%;border:0;height:6000px" loading="lazy"></iframe>
<iframe src="https://branch-to-hope.base44.app/pass-it-on/wholesale" title="Branch To Hope — Wholesale" style="width:100%;border:0;height:4200px" loading="lazy"></iframe>
<iframe src="https://branch-to-hope.base44.app/podcasts" title="Branch To Hope — Podcasts" style="width:100%;border:0;height:1800px" loading="lazy"></iframe>

Challenges

https://branch-to-hope.base44.app/embed/challenges

Without the site header and footer, so it sits under your own Wix challenge heading.

<iframe src="https://branch-to-hope.base44.app/embed/challenges" title="Branch To Hope — Challenges" style="width:100%;border:0;height:3200px" loading="lazy"></iframe>
<iframe src="https://branch-to-hope.base44.app/ambassadors" title="Branch To Hope — Ambassadors" style="width:100%;border:0;height:4200px" loading="lazy"></iframe>
<iframe src="https://branch-to-hope.base44.app/blog" title="Branch To Hope — Blog" style="width:100%;border:0;height:3000px" loading="lazy"></iframe>
<iframe src="https://branch-to-hope.base44.app/contact" title="Branch To Hope — Contact" style="width:100%;border:0;height:3200px" loading="lazy"></iframe>
<iframe src="https://branch-to-hope.base44.app/faq" title="Branch To Hope — FAQ" style="width:100%;border:0;height:3600px" loading="lazy"></iframe>

If you would rather link than embed, use the plain address shown under each page name.