Problem
When elementor-cli push creates or updates a page, it does not set the _elementor_version WordPress post meta key. Without this key, Elementor assumes the page was built with an older version and adds the elementor-bc-flex-widget CSS class to the page container.
This triggers a backwards-compatibility CSS rule:
.elementor:not(.elementor-bc-flex-widget) .elementor-widget-wrap { display: flex; }
Because elementor-bc-flex-widget is present, the :not() selector doesn't match, and .elementor-widget-wrap falls back to display: block. This breaks any widgets using _element_width: auto (e.g., buttons intended to flow side-by-side), causing them to stack vertically instead.
How to reproduce
- Create or push a page with
elementor-cli push
- Add button widgets with
_element_width: auto
- Observe that buttons stack vertically instead of flowing horizontally
- Compare with a page that was saved through the Elementor editor UI — it has
_elementor_version set and displays correctly
Workaround
Manually set the meta via WP-CLI:
wp post meta update <page-id> _elementor_version "3.32.4"
Suggested fix
When elementor-cli push writes a page, it should also set _elementor_version to the installed Elementor version (or at least a recent version). This can be read from wp option get elementor_version or from the Elementor plugin metadata.
Optionally, elementor-cli pull could also include _elementor_version in page.json so it round-trips correctly.
Problem
When
elementor-cli pushcreates or updates a page, it does not set the_elementor_versionWordPress post meta key. Without this key, Elementor assumes the page was built with an older version and adds theelementor-bc-flex-widgetCSS class to the page container.This triggers a backwards-compatibility CSS rule:
Because
elementor-bc-flex-widgetis present, the:not()selector doesn't match, and.elementor-widget-wrapfalls back todisplay: block. This breaks any widgets using_element_width: auto(e.g., buttons intended to flow side-by-side), causing them to stack vertically instead.How to reproduce
elementor-cli push_element_width: auto_elementor_versionset and displays correctlyWorkaround
Manually set the meta via WP-CLI:
Suggested fix
When
elementor-cli pushwrites a page, it should also set_elementor_versionto the installed Elementor version (or at least a recent version). This can be read fromwp option get elementor_versionor from the Elementor plugin metadata.Optionally,
elementor-cli pullcould also include_elementor_versioninpage.jsonso it round-trips correctly.