Docs / Publishing

Publishing & integration

How LHAI saves pages, updates them silently, and coexists with Gutenberg and Elementor.

Publish vs. Save Draft

Both buttons commit the current HTML to a real WordPress post. The only difference is post_status:

LHAI pages are stored as regular page post types. They appear in WordPress's standard Pages list, can be assigned to menus, and use whatever permalink structure your site has configured.

First publish

The first time you save a page, LHAI shows a small modal asking for a page name. That name becomes the post_title and, via the slug, the URL.

Name your page
This becomes the page title and its URL slug.
Italian Restaurant — Landing
Cancel Publish

Re-publish (silent update)

After the first save, the Publish button label becomes Update. Subsequent clicks skip the name modal, push the current HTML/CSS to the same post ID, show a toast (✅ Page updated!), and leave you in the builder. No modal friction, no duplicate page.

Why this matters: earlier versions had a bug where re-publishing created a new WordPress post each time. If you're on LHAI 1.0.23 or later, that bug is gone — one published page has one post ID for life.

Preview

The Preview Page button opens the live URL in a new tab. It only becomes active after the first save (before that, there's nothing to preview — the page is still in memory).

Gutenberg protection

If someone opens an LHAI page in the standard WordPress (Gutenberg) editor, LHAI overlays the block canvas with a card:

Built with LHAI. To edit this page, use the LHAI Builder to keep your design intact.

[Edit with LHAI]

I know what I'm doing — show raw code

This is deliberate. A Gutenberg editor can't round-trip the custom HTML + scoped CSS that LHAI produces, and saving in Gutenberg would mangle it. The Edit with LHAI button is the fast path. The "I know what I'm doing" link is an escape hatch if you genuinely need to poke the raw HTML — use it carefully.

Elementor coexistence

LHAI and Elementor don't conflict. Each page chooses one editor (LHAI or Elementor), and the other's admin-bar button appears alongside so you can jump between them. Pages built in Elementor are unaffected by LHAI; pages built in LHAI never call into Elementor.

If Elementor is active, LHAI's own Edit with LHAI admin-bar button appears at priority 80, typically right after Elementor's own entry. Both behave identically: click to jump into the respective editor.

LHAI respects your site's permalink structure (pretty, day-and-name, post-name, etc.). If you ever see a 404 on a freshly published LHAI page, it's almost always stale permalink cache — Settings → Permalinks → Save Changes flushes it and the page appears.

Exporting

Every published LHAI page is plain HTML in the post_content column. You can: