Skip to main content

Divi installation

Divi Testimonials with the Code Module

Divi’s Testimonial module holds one typed quote per module, and Elegant Themes itself notes there is no way to manage them as a set. The Code module takes the StoryProof embed instead. Paste the div there, and either keep the script beside it or load it once for the whole site from Theme Options.

  • The div for a Code module, the script for Theme Options
  • Divi 4 and Divi 5 field names side by side
  • Showing a different widget on phones with Visibility

Code generator

Code for a Divi site

Type the widget id. The div goes into a Code module in the row where testimonials belong. The script can sit in the same module, or once in Theme Options if widgets appear on many pages.

Shown in StoryProof when you copy a widget’s embed code.

Part 1 · A Code module in your Divi row

Visual Builder › gray plus in the row › Code › Content tab (Text in Divi 5, Code in Divi 4)

<div data-storyproof-widget="YOUR_WIDGET_ID"></div>

Part 2 · Site-wide body code, or the same Code module

WordPress dashboard › Divi › Theme Options › Integration › body code field

<script src="https://app.storyproof.io/embed.js" async></script>

Save the page and exit the Visual Builder, then load it in a private window. Judge the widget on the published page, not inside the builder.

The code is put together in your browser; the id is not stored.

The problem, solved

Divi testimonial sections that fall behind, and how StoryProof fixes them

  • Problem 1

    Ten Testimonial modules and no list of them

    Each Divi Testimonial module is independent, so finding which pages still show an outdated quote means opening them one by one.

  • Problem 2

    Every client site needs its own testimonials

    Agencies on Divi run many client sites, and mixing one client’s reviews into another’s workspace is an expensive mistake.

  • Problem 3

    The script ends up pasted on every page

    When each Code module carries its own script, a page with two widgets loads the same file twice and a later change means hunting every copy.

  • Problem 4

    A wall looks heavy on a phone

    A full testimonial wall that suits a desktop services page can turn into an endless scroll on mobile.

In StoryProof

Set it up in Divi

Step 1 of 5

Copy the widget id from StoryProof

Open the widget, check the testimonials it holds and copy its id into the generator above.

Where the script should live on a Divi site

Your situationPut the script inWhy
One widget on one pageThe same Code module as the divEverything about the widget stays in one spot
Widgets on many pagesTheme Options, Integration, body codeOne copy for the whole site, nothing to forget on new pages
Widgets only in a Theme Builder templateA Code module in that templateThe script loads only where the template applies
A client who edits pages but not settingsTheme Options, set by youThe client then only ever handles the short div line

Before you start

Divi limits worth knowing

  • WordPress roles still apply

    Divi runs on WordPress, and WordPress strips script tags from content saved by users without the unfiltered_html capability. If the script vanishes after a client saves, use the Theme Options route so the client only edits the div.

  • Divi 4 and Divi 5 label things differently

    The Code module field is called Code in the older documentation and Text in the Divi 5 article. The module and its place in the list are the same.

  • No Divi module from StoryProof

    StoryProof is not sold as a Divi module or plugin. It uses Divi’s own Code module. If a site cannot take custom code at all, share the hosted Wall of Love link.

  • Branding badge

    Widgets carry a small "Powered by StoryProof" line until Pro, worth knowing before a client asks.

  • Based on Elegant Themes docs, 2026-11-12

    The menu names follow the Elegant Themes help center as read on 2026-11-12. Nobody has followed these steps on a live Divi site yet, and Divi’s builder changes often.

FAQ

Questions people ask

Short answers to what usually comes up next.

Can I keep using the Divi Testimonial module?

Yes, for a single hand-picked quote that never changes. For a growing set of collected testimonials, a Code module with a StoryProof widget is easier to keep current.

Is the Code module part of the paid Divi theme?

It ships with Divi as a native module. No extra Divi plugin is needed.

Should the script go in the head or the body field in Theme Options?

Use the body field. The widget needs its div on the page, and loading the script with the body content keeps it out of the way of anything in the head.

How do I show one widget on desktop and another on mobile?

Put each widget’s div in its own Code module and set each module’s Visibility in the Advanced tab so one hides on phones and the other on desktop.

Still have a question? Ask the StoryProof team or book a demo.

Stop retyping quotes into Divi modules

Collect testimonials once, approve them, and show them anywhere a Code module fits.

Sources

  1. How to Add Custom JavaScript Code in Divi, Elegant Themes Help Center. Checked 2026-11-12.
  2. The Code Module (Divi 5), Elegant Themes Help Center. Checked 2026-11-12.
  3. The Divi Testimonial Module, Elegant Themes Help Center. Checked 2026-11-12.
  4. Custom HTML, WordPress.org Documentation. Checked 2026-11-12.

Last updated 2026-11-12.