Text Block is a WordPress ability from The Plus Addons for Elementor — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Text Block

Write

Adds the The Plus "Text Block" widget (rendered as widgetType tp-adv-text-block) to an Elementor container, displaying formatted text content with optional length limiting.

Requires the The Plus Addons for Elementor plugin (which registers under the 'tpae' ability category) on WordPress 6.9+, with Elementor active. Every ability requires the current user to have the 'edit_posts' capability (and 'edit_post' for the specific post being modified); abilities that create or edit content also verify Elementor and, where relevant, the target The Plus widget are available. A subset of abilities (theme templates, template conditions, dynamic tags, popups, and some custom-code abilities) only register when Elementor Pro is active, and many widget abilities load only in the free plugin when the Pro add-on is inactive.

What it does

The execute_callback tpae_mcp_add_theplus_text_block_ability checks Elementor is active and that the tp-adv-text-block widget type is registered (via tpae_mcp_has_registered_widget, which checks Elementor's widgets_manager), requires post_id, parent_id, and non-empty content_description (validated with wp_strip_all_tags), and confirms the target post exists. It loads the post's Elementor element tree via tpae_mcp_get_elementor_page_data (falling back to the _elementor_data post meta if the document API returns nothing), builds settings from content_description (wp_kses_post), content_align, display_count, display_count_by (sanitize_key), and display_count_input (clamped to a minimum of 1), merges in any raw settings, and constructs a new widget element. It inserts the widget into the parent container at the given position via tpae_mcp_insert_elementor_element (recursively searching the tree) and saves the data with tpae_mcp_save_elementor_page_data, which calls the Elementor document's save() and falls back to directly updating the _elementor_data/_elementor_edit_mode/_elementor_version post meta and clearing _elementor_css if the native save fails. This file also defines the shared helper functions (tpae_mcp_has_registered_widget, tpae_mcp_get_elementor_page_data, tpae_mcp_save_elementor_page_data, tpae_mcp_insert_elementor_element, tpae_mcp_generate_elementor_element_id) used by the sibling widget-ability files.

See it in action

You ask your AI assistant

"Add a text block widget with our mission statement, center-aligned, limited to 200 characters, to the About page."

Inputs

Name Type Required Description
post_id integer Yes Elementor page/post ID
parent_id string Yes Target Elementor container ID
position integer No Insert position. Use -1 to append.
content_description string Yes Main text content for the widget
content_align string No Desktop text alignment (left, center, right, justify)
display_count string No Enable text limit (yes, no)
display_count_by string No Limit text by character or word count (char, word)
display_count_input integer No Character/word limit count
settings object No Raw Elementor/The Plus control settings to merge into the widget at creation time. Use control keys from sprout/get-theplus-widget-schema.

Returns

Returns the new element_id, the widget_type (tp-adv-text-block), and the post_id the widget was added to.

Permission

Requires the current user to have the edit_posts capability, and if a post_id is supplied, also requires edit_post capability for that specific post.

Newsletter

The AI + WordPress space moves fast. Keep up.

New tools, workflow ideas, and product updates — be the first to know what's next.

No spam, unsubscribe anytime.