Get Post/Page ID by Title is a WordPress ability from Premium Addons for Elementor — usable via Easy MCP AI, which connects Claude, ChatGPT, and any AI assistant to your site.

Install Free Plugin →

Get Post/Page ID by Title

Read-only
Premium Addons for Elementor Page Builders premium-addons/get-id-by-title

Resolve a post or page to its numeric ID by its exact title.

Requires the Premium Addons for Elementor plugin on WordPress 7.0+ for the Abilities API (abilities are registered only when the wp_register_ability() function exists). Dashboard, settings and site-inventory abilities (get-id-by-title, list-pages, list-templates, get-global-settings, get-settings, update-setting, scan-usage, disable-unused-widgets, clear-dynamic-assets, subscribe-newsletter) require the caller hold the 'manage_options' capability. premium-addons/create-page requires 'edit_pages'. premium-addons/get-widget-schema, premium-addons/get-addon-schema, premium-addons/list-available-elements, premium-addons/list-pa-addons, premium-addons/detect-atomic-support, premium-addons/check-elementor-element and premium-addons/create-elementor-template require 'edit_posts'. premium-addons/get-page-structure, premium-addons/get-element-settings, premium-addons/add-flexbox, premium-addons/add-container, premium-addons/update-element-settings, premium-addons/insert-widget, premium-addons/remove-element, premium-addons/change-post-status and premium-addons/duplicate-post require 'edit_post' on the target post_id, and deny requests for a nonexistent post_id outright.

What it does

This ability resolves any post or page to its numeric ID by matching its exact title, so an AI assistant can turn a title mentioned in conversation into an ID the other Premium Addons abilities need. There's no reusable Premium Addons resolver for this — the plugin's own title-lookup helper is hardwired to the elementor_library post type and its AJAX list endpoint returns whole lists rather than a single match — so this queries WP_Query directly, and deliberately avoids the deprecated get_page_by_title() function. Titles aren't unique, especially across post types, so the first match is returned; pass post_type to disambiguate (it defaults to page, or use "any" to search every public type). Returns null when nothing matches rather than an error.

See it in action

You ask your AI assistant

"What's the post ID for the page titled 'Pricing'?"

Inputs

Name Type Required Description
title string Yes The exact title of the post or page to resolve.
post_type string No The post type to search. A specific type (e.g. page, post) or "any" to search every public type. Defaults to page.

Returns

An object with a single 'id' field containing the numeric ID of the first matching post, or null when no post matches the title.

Permission

The current user must have the 'manage_options' capability, checked via Premium Addons' Admin_Helper::check_user_can().

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.