> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wpos.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Divi

> WPOS builds real Divi pages, from a design's own code or in native Divi modules, and its widgets work as native modules in Divi 4 and Divi 5.

export const YouTubeVideo = ({id, title, caption}) => {
  const [playing, setPlaying] = useState(false);
  return <div className="demo-embed">
      {playing ? <iframe src={`https://www.youtube-nocookie.com/embed/${id}?autoplay=1&rel=0&playsinline=1`} title={title} allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen /> : <button type="button" className="yt-facade" onClick={() => setPlaying(true)} aria-label={`Play video: ${title}`} title={title}>
          <span className="yt-facade-thumb" style={{
    backgroundImage: `url(https://i.ytimg.com/vi/${id}/maxresdefault.jpg)`
  }} aria-hidden="true" />
          <span className="yt-facade-play" aria-hidden="true">
            <svg width="26" height="26" viewBox="0 0 24 24" fill="currentColor">
              <path d="M8 5.14v13.72a1 1 0 0 0 1.52.85l10.97-6.86a1 1 0 0 0 0-1.7L9.52 4.29A1 1 0 0 0 8 5.14z" />
            </svg>
          </span>
        </button>}
      {caption ? <p className="demo-caption">{caption}</p> : null}
    </div>;
};

On a site running Divi, WPOS builds real Divi pages. Give it a design and it
can assemble the page from that design's own code, or build it again in
native Divi modules. Its widgets show up in the Divi Builder like any other
module.

<YouTubeVideo id="xI-UUs7HiAA" title="WPOS Takes Over Divi" caption="One artboard in, two Divi pages out" />

<Note>
  The **Preferred page builder** setting in [Settings](/operate/settings)
  offers Gutenberg and Elementor. On a Divi site, say in the chat that you want
  the page built in Divi.
</Note>

## Two ways to build a Divi page

<CardGroup cols={2}>
  <Card title="From the design's own code" icon="code">
    Give WPOS a design, such as a [Stitch](/connectors/stitch) artboard, and it
    assembles the page from the design's exported HTML and CSS instead of
    redrawing it, so the result matches the design.
  </Card>

  <Card title="In native Divi modules" icon="table-columns">
    Ask for the page in native Divi modules and it builds one you can edit
    module by module in the Divi Builder.
  </Card>
</CardGroup>

In the video, WPOS does both from one Stitch artboard:

* It copies the design's images into the media library first, because the
  original image links would expire.
* It fixes what WordPress and Divi change on save, such as extra paragraph
  tags, stripped form fields, and Divi styles overriding the design's own.
* Before the native rebuild, it says which parts of the design have no native
  Divi equivalent, and builds the native version on its own page instead of
  replacing the one that already works.

```text theme={null}
Build this Stitch design as a page in Divi, then build
the same page again in native Divi modules.
```

## WPOS widgets in Divi

* **Native Divi modules.** Every WPOS widget is registered as a Divi module,
  on both **Divi 4** (classic, shortcode-based pages) and **Divi 5**
  (block-based pages).
* **In the Visual Builder.** On Divi 4, add and edit WPOS modules in the
  Visual Builder like any other module.
* **Same output everywhere.** A widget renders the same HTML on Divi 4 and
  Divi 5, and the same widget also works in Gutenberg and Elementor.

<CardGroup cols={2}>
  <Card title="Page builders" icon="cubes" href="/operate/builders">
    How WPOS works across page builders, with no lock-in.
  </Card>

  <Card title="Gutenberg" icon="wordpress" href="/operate/gutenberg">
    Build with core blocks and reuse sections as widgets.
  </Card>
</CardGroup>
