Add a Mega Menu to Your ElementsKit Header with AI
A wide drop-down panel with headings and links under one menu item, described to you before it goes live.
Prerequisites
A site connected to WPVibe running Elementor (free is enough) and ElementsKit Elementor Addons 4.0.8 or newer (tested on 4.0.8, the free version) on WordPress 6.9 or newer with a classic theme, with an administrator account. A header built with ElementsKit that uses its Nav Menu widget.
My WordPress site uses Elementor and the free ElementsKit Elementor Addons plugin, and my header is built with ElementsKit's Nav Menu widget. Give the menu item "[item]" a mega menu panel with [what goes in it, for example two columns: a heading and four links each]. [Optional: a badge on the item that says "[badge text]".]
1. ElementsKit's AI tools run through its own REST route: call rest_api_write with POST /elementskit/v1/mcp-proxy and the body {"tool": "TOOL_NAME", "input": {...}}. Don't use run_ability for them: ElementsKit keeps its abilities off the Abilities REST API. If the route is not found, stop and tell me to update ElementsKit.
2. Fetch my home page with get_page_html and selector .elementskit-menu-container: its id is ekit-megamenu-MENU_SLUG. If nothing comes back, stop and tell me: my header doesn't use ElementsKit's Nav Menu widget, and my theme's own menus ignore ElementsKit mega menus.
3. Match the slug to a menu id with GET /wp/v2/menus, then run list-mega-menus and find that menu and the item; if the item is not in it, tell me which menu my header shows and stop. Check GET /wp/v2/menu-items/ITEM_ID has parent 0: panels only show on top-level items, so if it does not, tell me and stop. If the item already has mega_menu_enabled true, tell me and stop: this recipe would replace its panel. Note whether the menu's own mega_menu_enabled is true. If it is not, list the other items in it with mega_menu_enabled true: switching the menu on shows their panels and badges too, so tell me about them.
4. Read the item's settings with rest_api GET /elementskit/v1/megamenu/get_menuitem_settings?menu_id=ITEM_ID and keep them for the undo (an empty list means it never had any). Plan the panel as an Elementor element tree: containers holding heading and text-editor widgets, links as anchor (a) tags in the text. For any ElementsKit widget, run the list-widgets tool (input {"search": "WORD"}) and use the type it returns exactly: a widget type Elementor doesn't know is dropped without an error (the Nav Menu widget is ekit-nav-menu). Elementor's own heading, text-editor and button widgets work too (heading: title, header_size, link {"url"}, title_color; text-editor: editor; button: text, link {"url"}). Describe the panel to me, tell me it goes live on every page as soon as it saves, and wait for my yes.
5. On my yes, run update-mega-menu-item with the item's menu_item_id, elements set to the panel, and settings: the ones from step 4 with menu_enable 1 and menu_has_child "1", megamenu_width_type default_width if it is empty, and menu_badge_text only if I asked for a badge. The settings replace all of the item's mega menu settings, which is why you start from the old ones. Then, if the menu's switch was off in step 3, run enable-mega-menu with its menu_id.
6. Then clear any page cache on my site, and if my host keeps an object cache (Redis or Memcached), flush it with run_wp_cli (cache flush): ElementsKit caches which header is on and which menus use mega menu. Fetch the home page with get_page_html and selector #ekit-megamenu-panel-ITEM_ID, and check the panel's text is there. If not, check once more. If it still fails, run update-mega-menu-item with the settings from step 4 (or {"menu_enable": 0} if there were none), switch the menu back off if you switched it on, clear the caches again, and tell me what you saw.
7. Tell me how to undo: update-mega-menu-item with the settings from step 4 (or {"menu_enable": 0} if there were none), enable-mega-menu with enabled false if you switched the menu on, then clear the caches.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Add a Mega Menu to Your ElementsKit Header with AI” recipe from the WPVibe cookbook on my connected site.
A plain dropdown works for five links. A shop with categories, a venue with rooms and events, or a course catalog needs a wide panel with headings and groups of links, and ElementsKit’s mega menu builds one, after you find the right switch on the menu, the right item and the panel editor.
The AI finds the menu your ElementsKit header shows, reads the item’s current settings, plans the panel for the item you name and describes it to you first. On your yes it saves the panel, switches mega menu on for that menu if it is off, and fetches a page to confirm the panel is in your header.
The panel goes live on every page as soon as it saves, so the AI waits for your yes. It works only in a header built with ElementsKit’s Nav Menu widget; your theme’s own menus ignore ElementsKit panels, and the AI checks for that first. The AI keeps the item’s old settings, so undoing puts them back.
Outcome
The menu item opens a mega menu panel with the content you approved, on every page.