Skip to main content
Cookbook Marketing Menu Icons

Turn the Social Links in Your Menu into Icons with AI

Each social, email and phone link in your menu shown as its brand icon, with the name kept for screen readers.

Difficulty Beginner
Time ~5 min

Prerequisites

A site connected to WPVibe running Menu Icons by Themeisle 0.13.27 or newer (tested on 0.13.27, free) on WordPress 6.9 or newer, with an administrator account, and a classic theme whose menus are set under Appearance, Menus. Font Awesome ticked under Icon Types in the Menu Icons Settings box for Instagram, YouTube, LinkedIn, Pinterest and WhatsApp icons.

The prompt
My site uses Menu Icons by Themeisle. Turn the social links in my [footer menu, or the menu's name] into brand icons, [icons only, or icons with the text].

1. Run discover_abilities with category menu-icons. If menu-icons/search-icons and menu-icons/set-item-icon are not both listed, stop and tell me to install or update the free Menu Icons by Themeisle plugin (0.13.27 or newer, on WordPress 6.9 or newer). If one answers that I am not allowed, tell me WPVibe must be connected as an administrator, then stop.
2. Run rest_api GET /wp/v2/themes?status=active. If is_block_theme is true, tell me that you can only set icons on classic menus (Appearance, Menus), and that links in the block editor's Navigation block get their icons in the editor instead (Menu Icons adds a Change Menu Icon button there), which you can't set or read; then ask before going on.
3. Find the menu: rest_api GET /wp/v2/menu-locations shows which menu id sits in each theme location (0 is none), and GET /wp/v2/menus?per_page=100 lists every menu with its id and name. If more than one menu could be the one I mean, ask me which.
4. List its items with rest_api GET /wp/v2/menu-items?menus=MENU_ID&per_page=100 (id, title, url, parent). For each item, read the icon it has now with run_wp_cli: post meta get ITEM_ID menu-icons --format=json (nothing back means no icon). Keep this as the before list.
5. Pick out the items whose url goes to a social site (facebook.com, instagram.com, youtube.com, linkedin.com, twitter.com or x.com, pinterest.com, wa.me or whatsapp.com, tiktok.com, threads.net), an email address (mailto:) or a phone number (tel:). Leave every other item alone.
6. Run menu-icons/search-icons with no input: it lists the icon sets that are turned on and the settings each supports. Only Dashicons is on unless someone ticked more under Icon Types in the Menu Icons Settings box on Appearance, Menus. Read the menu's own icon defaults, which Menu Icons uses when icons are picked by hand: run_wp_cli option get menu-icons --format=json, key menu_MENU_ID (if the option or that key is missing, there are none). The settings for each new icon are those defaults with what I asked for on top, and position before when neither says. Keep only the settings search-icons lists for the icon's type, leave out empty ones, use hide_label true when it is 1, and give sizes as numbers. For each link, run menu-icons/search-icons with the brand name as query (facebook, instagram, youtube, linkedin, twitter, pinterest, whatsapp; for email try email, then envelope; for a phone number, phone) and pick one set for all of them, Font Awesome when it's on. Search only looks in the sets that are on. If a brand has no icon there and Font Awesome isn't on, tell me to tick Font Awesome under Icon Types in the Menu Icons Settings box on Appearance, Menus (it has Instagram, YouTube, LinkedIn, Pinterest and WhatsApp), and wait until I say it's done. No set has TikTok, the X logo or Threads: say so and leave those items as they are, except that for an x.com or twitter.com link you can offer the old Twitter bird icon and ask me.
7. Show me a table before changing anything: item, url, its current icon (or none), the new icon (set and id), icon only or with text, and every other setting you will pass. Wait for my yes; menu changes show on the site at once.
8. Run menu-icons/set-item-icon for each approved item, with item_id and icon set to type, id, and hide_label true for icon only (the name stays for screen readers) or false to keep the text. Pass every setting shown in the table on each item, position included (without it the icon sits right against the text): on the site an item shows only the settings stored on it, even though the reply lists the menu's defaults too. Settings already stored on the item and left out stay as they are. If it answers menu_icons_disabled_for_menu, stop and tell me Menu Icons is turned off for that menu, by code on the site (the menu_icons_menu_settings filter, usually in the theme or a must-use plugin) or by a value written straight into the menu-icons option; there is no setting for it.
9. Finish with a list of each item, its old icon (or none) with its settings, and its new one, so I can spot-check the menu on the site while signed out (signed in, an administrator can see labels hidden by a menu setting that visitors don't get). To undo one, run menu-icons/set-item-icon with remove: true; if it had an icon before, set it again from the before list: its type; its icon value as id for a font set, or as attachment_id for image and svg; and only the settings search-icons lists for that type, skipping empty ones, with hide_label true if it was 1 (left out otherwise) and sizes as numbers. Setting the old icon without removing first keeps the new settings.
Already connected?

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

Run the “Turn the Social Links in Your Menu into Icons with AI” recipe from the WPVibe cookbook on my connected site.

Links to your Facebook, Instagram or YouTube page read better as the small brand icons visitors know than as words, especially in a footer or top bar. Matching each link to the right brand icon, and hiding the text without hiding it from screen readers, is fiddly work in Appearance, Menus.

The AI finds the menu items that link to social sites, email or phone, picks each brand’s icon from the icon sets you have on, and shows you the list before it changes anything. Icon only keeps the name for screen readers, so the links still make sense to people who can’t see them. Nothing is set until you say yes, and it keeps a list of the old icons for undo.

Say which menu holds the links and whether you want icons only or icons with the text. Dashicons, the only set on by default, has Facebook and Twitter but not Instagram, YouTube or LinkedIn: tick Font Awesome under Icon Types in the Menu Icons Settings box on Appearance, Menus first. No set has TikTok, the X logo or Threads; for those, use your own image with this recipe.

Outcome

The menu's social, email and phone links show as brand icons, and you have a list of what changed and how to undo it.