Skip to content

Templates & Theme Builder

Saves a page (or any element) as a reusable template in Elementor’s template library.

Input:

  • post_id: source page
  • element_id: optional, save just one element; omit for whole page
  • title: name for the new template
  • type: page, section, widget

Returns: { template_id }.

Applies a saved template to a target page. Inserts the template’s elements as children of the page root (or of a specific parent if you pass one).

Input:

  • target_post_id
  • template_id
  • parent_id: optional insertion target inside the target page
  • position: child index, -1 to append

Returns: { inserted_element_ids: [...] }.

Pro theme builder tools (6, when Elementor Pro is active)

Section titled “Pro theme builder tools (6, when Elementor Pro is active)”

Creates a theme builder template: header, footer, single post, archive, error 404, or loop item.

Input:

  • title
  • template_type: header, footer, single-page, single-post, archive, error-404, loop-item

Returns: { template_id, edit_url }.

Sets display conditions on a theme builder template (which pages it applies to).

Input:

  • template_id
  • conditions: array of { type, sub_type, name?, exclude }

Lists every dynamic tag available from Elementor Pro (post-title, author-info, ACF fields, etc.), grouped by category.

Returns: array of { name, title, group, categories }.

Binds a dynamic tag to a specific element setting. Replaces the static value with a dynamic reference that Elementor evaluates per-page.

Input:

  • post_id
  • element_id
  • setting_key: which setting to bind (e.g. title)
  • dynamic_tag: the tag name from list-dynamic-tags
  • settings: tag-specific config (varies per tag)

Creates a popup template.

Input: title.

Returns: { popup_id, edit_url }.

Sets triggers, display conditions, and timing on a popup.

Input:

  • popup_id
  • triggers: array (page-load, scroll, click, exit-intent, inactivity)
  • conditions: display conditions (same shape as set-template-conditions)
  • timing: show frequency rules