Website builders

Add your reviews to Weebly

The Embed Code element shows your approved Mocha reviews on any page of your Weebly site. Weebly only displays some embedded code on the published site, not in the editor.

TL;DR in 5 steps

  1. In Mocha, go to “Embed” > “Widget”, choose a widget and click “Copy code”.
  2. Open your site in the Weebly editor and go to the page you want.
  3. In the “Build” tab, drag the “Embed Code” element to where the reviews should go.
  4. Click inside the element, choose “Edit Custom HTML” and paste the code.
  5. Click “Publish” and check the published page.

Before you start

  • A Mocha space with at least one approved review. Without approved reviews the widget stays empty.
  • The embed code from your Mocha dashboard (see step 1).
  • Access to the Weebly editor for your site.

These steps are for the Weebly editor. Weebly is part of Square, and online shops built with Square Online use a different editor.

The widget appears exactly where you paste the code. It runs in a sealed-off area (Shadow DOM): your Weebly theme's styles don't change it, and it doesn't change your theme.

Step by step

  1. Copy the code in Mocha

    Open your space in the Mocha dashboard and click “Widget” under “Embed” in the space navigation. Pick a widget under “Choose a widget”, adjust “Appearance” and “Layout” (“Options” for some widgets), then click “Copy code”.

    The copied code is a single script tag. Yours contains your space's identifier instead of “your-space”:

    HTML
    <script
      src="https://mocha.de/api/embed/your-space/widget.js"
      data-mode="wall"
      async></script>
  2. Open the page in the editor

    Log in to Weebly, open your site in the editor with “Edit Site” and go to the page where the reviews should appear.

  3. Drag the Embed Code element onto the page

    In the “Build” tab, drag the “Embed Code” element onto the page, to the spot where the reviews should appear. While you drag, a blue line shows where the element will land.

  4. Paste the code

    Click inside the element and choose “Edit Custom HTML”. Paste the Mocha code, then click anywhere outside the element. Weebly doesn't display some code in the editor, so if the element stays empty there, that's not an error.

  5. Publish and check

    Click “Publish”. Then open the published page in your browser and check the widget, on a phone as well.

Alternative: iFrame

If the widget doesn't appear on the published page either, you can embed your space's review wall page in a frame instead. In the Mocha dashboard, expand “iFrame embed” below “Embed code”, click “Copy” and paste the code into an Embed Code element as in step 4.

The frame has a fixed height of 600 pixels. Change the number under height in the code if needed. Of your dashboard settings, the review wall page only takes over the theme (light or dark).

If the widget doesn't appear

  • Not published yet: Weebly only shows some code on the published site. Click “Publish” and check the live page.
  • Incomplete code: According to Weebly, incomplete code can cause problems. The code starts with <script and ends with </script>. If in doubt, delete the element and paste the code again.
  • Scroll bar in the iFrame: If you use the iFrame option and the review wall is taller than the frame, a scroll bar appears. Increase the number under height in the code, or switch back to the script widget, which adjusts its height by itself.
  • No approved reviews: The widget only shows approved reviews. See approve reviews.
  • Space paused: If “Space is active” is switched off in the space's “Settings”, Mocha doesn't show the widget.

Frequently asked questions

Why can't I see the widget in the Weebly editor?

Weebly doesn't display some types of embedded code in the editor. Publish your site and check the live page, where the widget loads your approved reviews straight from Mocha.

Do these steps also work for Square Online?

No, they describe the Weebly editor. Square Online has its own editor with different names. According to the Square help centre, it has a separate section for embed code that is only available on certain plans.

Can I use several widgets on one page?

Yes. Add a separate Embed Code element with the matching code for each widget, for example a Badge near the top and a Wall of Love further down the page.

Do I need to change the code when new reviews come in?

No. The widget loads your approved reviews live from Mocha on every page view. Newly approved reviews appear after about a minute, without any change or republishing in Weebly.

Ready for your first reviews?

Start for free, no credit card needed. Your form is ready in minutes.

Sign up for free