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:
- Publish → status
publish, visible on the live site. - Save Draft → status
draft, editable by admins only.
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.
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.
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.
Permalinks
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:
- Export via WordPress's built-in Tools → Export (WXR XML).
- Copy the HTML directly from the WordPress database or via WP REST API
/wp-json/wp/v2/pages/{id}. - Use LHAI's Export screen to download clean, self-contained HTML for hosting elsewhere.