Show an Elementor Section Only to Some Visitors with Premium Addons and AI
Show a section only to logged-out visitors, or only between two dates, checked as a logged-out visitor sees it.
Prerequisites
A site connected to WPVibe running Elementor (free is enough) and Premium Addons for Elementor 4.11.111 or newer (tested on 4.11.111, the free version) on WordPress 7.0 or newer, with an administrator account and Premium Addons' AI tools on: in wp-admin, Premium Addons > MCP Config & AI Abilities, switch on Enable MCP & AI Abilities. A page built with Elementor with the section already on it.
My WordPress site uses Elementor and the free Premium Addons for Elementor plugin. On my page [page title], show the section that starts with "[its first words]" only [to logged-out visitors, or between two dates, or both].
1. Run get_ability_info for each Premium Addons ability this recipe uses: premium-addons/get-page-structure, premium-addons/get-element-settings, premium-addons/get-addon-schema and premium-addons/duplicate-post. If none is found, stop and tell me to turn Premium Addons' AI tools on in wp-admin: open Premium Addons, then MCP Config & AI Abilities, and switch on Enable MCP & AI Abilities. If only some are missing, stop and tell me to switch those back on under Manage AI Abilities on the same screen. Premium Addons keeps its build tools (insert-widget, add-container and the rest of its build group) and its template library off the REST API, so WPVibe can't call them; don't look for them, and ignore its design guide where it names them. Load WPVibe's elementor skill for the element format.
2. Find the page with GET /wp/v2/pages?search=[page title]&status=publish,draft,private, then read it with rest_api GET /wp/v2/pages/PAGE_ID with query context edit and _fields id,modified,link,meta._elementor_edit_mode. PAGE_ID is its id and PAGE_URL its link; SITE_URL is my site's address. If _elementor_edit_mode is not builder, stop and tell me the page isn't built with Elementor. Read its layout with premium-addons/get-page-structure and note the ids of its top-level sections, in order.
3. Find the section (SECTION_ID) in the structure and read its settings with premium-addons/get-element-settings. If it already has pa_display_conditions_switcher yes, show me its conditions and stop: this recipe adds conditions to a section that has none. Run premium-addons/get-addon-schema with element container (or section, if that is its type) and addon section_pa_display_conditions, and use only those keys. If it says Display Conditions is not available, stop and tell me to switch it on in wp-admin: Premium Addons, then Features.
4. Plan the settings: pa_display_conditions_switcher yes, pa_display_action show, pa_display_when all, and pa_condition_repeater with one row per condition, each with its own _id of 7 random lowercase hex characters. Logged-out visitors: pa_condition_key login_status, pa_condition_operator not, pa_condition_login_status logged. Dates: pa_condition_key date_range, pa_condition_operator is, pa_condition_date_range "YYYY-MM-DD to YYYY-MM-DD" (both days included), pa_condition_timezone server (my site's timezone; check it with GET /wp/v2/settings and tell me). Check run_wp_cli option get elementor_element_cache_ttl: unless it says disable, also add _element_cache "yes" to the section, because Elementor's element cache otherwise shows the first visitor's version to everyone. Elementor shows that setting on widgets only, so tell me it won't appear on the section in the editor. Show me the plan and who will see the section when.
5. Never resend or retype the page's whole layout: add the settings with one small edit. Run rest_api_write POST /wpvibe/v1/content/search with target_type meta, meta_key _elementor_data, the post_id named below and pattern SECTION_ID, and look at how the section's settings start. If they start with "settings":{ followed by other settings, use content/edit with old_content from {"id":"SECTION_ID" up to and including "settings":{ and new_content the same text followed by the new settings and a comma. If they are empty ("settings":[] or "settings":{}), replace that with "settings":{ and the new settings and a closing brace, without a comma. content/edit refuses an edit that would break the JSON. Keep the old_content and new_content: swapping them is the undo.
6. Copy the page with premium-addons/duplicate-post. COPY_ID is the post_id it returns; the copy is a draft. Make the edit on the copy (post_id COPY_ID); the copy has the same section ids. Give me the copy's preview link, SITE_URL/?page_id=COPY_ID&preview=true (it only opens while I'm logged in), tell me the preview shows the page as me, logged in, and wait for my yes. Nothing on my live page has changed yet. If I say no, move the copy to the trash with rest_api_write DELETE /wp/v2/pages/COPY_ID and stop.
7. On my yes, read the page's modified date again; if it changed since step 2, stop and tell me someone edited it. Otherwise make the same edit on the live page (post_id PAGE_ID). Run premium-addons/get-page-structure on it and check every top-level section id from step 2 is still there, in the same order. If not, undo the edit and tell me what you saw.
8. Fetch the live page with get_page_html, which sees it as a logged-out visitor and skips page caches, and check whether the class elementor-element-SECTION_ID is in the HTML: it should be there or not as my conditions say for today. Check the page's other sections are there. If it is wrong, undo the edit and tell me what you saw. Then run run_wp_cli cache purge --url=PAGE_URL and tell me what it reported. Ask me to open the page logged in to check the other side.
9. Move the draft copy to the trash with rest_api_write DELETE /wp/v2/pages/COPY_ID. Tell me how to undo: content/edit on the page with the old_content and new_content you used, swapped. If I used dates and my site or host caches pages, tell me to purge this page on my first day and again on the day after my last day. Tell me that saving this page in the Elementor editor later was not tested to keep the section's cache setting, and that the sure fix is in wp-admin: Elementor, then Settings, then Performance, Element Cache: Disable.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Show an Elementor Section Only to Some Visitors with Premium Addons and AI” recipe from the WPVibe cookbook on my connected site.
A sign-up offer that members shouldn’t see, a holiday notice that should vanish on the 2nd: in free Elementor, a section is either on the page or not, so someone has to remember to take it down. Premium Addons’ free Display Conditions can show a section only to logged-out visitors, or only between two dates, and then it takes care of itself.
The AI adds the conditions to the section you name on a draft copy of your page, shows you exactly who will see it and when, and changes the live page only on your yes. Unless Elementor’s element cache is already off, it also switches it off for that one section, because in testing the cache showed the first visitor’s version to everyone after them.
Dates use your site’s timezone and count whole days, both ends included. If your site uses a page cache, purge the page on the first day and on the day after the last, so it doesn’t keep serving yesterday’s version. The AI adds the conditions with one small edit and keeps a note of it, so taking them off again is one step.
Outcome
The section shows only to the visitors and on the dates you chose; everyone else sees the page without it.