Skip to main content

Show Logged-In Visitors a Different Header in Elementor with AI

A second header for logged-in members or customers, with My account in place of Sign up.

Difficulty Intermediate
Time ~10 min

Prerequisites

A site connected to WPVibe running Elementor (free is enough) and Ultimate Addons for Elementor 2.9.5 or newer (tested on 2.9.5, the free version) on WordPress 6.9 or newer with a classic theme, with UAE's AI tools on: in wp-admin, UAE > Settings > AI Tools, switch on Enable Abilities and Enable Edit Abilities. A published site header made with UAE.

The prompt
My WordPress site uses Elementor and the free Ultimate Addons for Elementor plugin (UAE). Show logged-in visitors a different header: same as my current one, but [replace the button "Book now" with "My account" linking to [account URL], and any other changes].

1. Run discover_abilities with category hfe-templates. If no uae/ abilities come back, stop and tell me to turn them on in wp-admin: UAE > Settings > AI Tools, switch on Enable Abilities and Enable Edit Abilities. If an ability a later step needs is missing (run discover_abilities without a category to check), stop and tell me to switch on Enable Edit Abilities and that ability's own switch on the same screen.
2. Run uae/templates-list with type type_header and status publish, and read each one's rules with uae/templates-get. If more than one header covers the whole site, or my site header's user_roles holds anything other than nothing, "" or "all" (all three mean everyone), tell me what is there and stop. List the published headers that target specific pages, and the pages among them that my site header does not already exclude.
3. Copy it with uae/templates-duplicate (title "[header title] logged in"). The copy is a draft with the same display rules, exclusions included; the pages from step 2 will be added to its exclusions. Read the copy with uae/builder-get-structure (full true). For every widget you use, run uae/builder-get-schema (type widget, tab style for colors, tab content for text and links) and use only the setting keys it lists. UAE's own build examples name some keys that do nothing: the search icon color is toggle_color, the site title color is heading_color, the copyright text color is title_color. A key the widget doesn't have saves without an error and changes nothing. The Search widget's style schema is longer than one result can hold and gets cut off; use toggle_color for its icon color as given. Show me each change with its old and new value and wait for my yes.
4. On my yes, make the changes on the copy with uae/builder-update-widget (only the keys that change) or uae/builder-insert-widget, and show me the result with uae/shortcode-render. Wait for my yes.
5. On my yes: set the copy's user_roles to ["logged-in"] with uae/display-rules-update (send only user_roles so the other rules stay; if step 2 found pages to add, also send exclude_locations with the copy's full list plus "post-[ID]" for each, and "specifics" in rule), publish it with uae/templates-update and run uae/builder-regenerate-css on it. Then set my original header's user_roles to ["logged-out"] the same way.
6. Fetch [a page on my site] with get_page_html, which sees the page logged out, and confirm it still shows my original header. Then ask me to open the same page while logged in and check the new one. If that check fails, clear any page cache on my site and check again; if it still fails, set everything you published in this chat back to draft, undo any rule you changed, and tell me what you saw.
7. Tell me how to undo: set the copy back to draft and set my original header's user_roles back to [].
Already connected?

Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:

Run the “Show Logged-In Visitors a Different Header in Elementor with AI” recipe from the WPVibe cookbook on my connected site.

Members, customers and students come back logged in, and the header still says Sign up and Book now. They want My account, their courses or their orders, and a header that knows who is looking is usually a paid feature or custom code.

Ultimate Addons for Elementor can show a header to logged-in or logged-out visitors only. The AI copies your header as a draft, changes the buttons or links you name, shows you the copy, and on your yes publishes it for logged-in visitors while your current header keeps serving everyone else.

Check it twice when it finishes: once in a private window, once logged in. Pages with their own header keep it: the copy carries over your header’s exclusions, and the AI adds any page-specific header it finds to them. To go back, set the copy to draft and clear the user rule on your original header.

Outcome

Logged-in visitors see their own header; logged-out visitors see the one you had.