Change a Gallery’s Layout and Look with FooGallery and AI
Switch a FooGallery gallery's layout or change its columns, lightbox and captions, with your earlier settings kept.
Prerequisites
A site connected to WPVibe running a recent FooGallery (tested on 3.3.37, free) on WordPress 6.9 or newer, with an administrator account.
My WordPress site uses FooGallery. Change my [gallery name] gallery: [what you want, for example switch to justified rows, show 4 columns, use a dark lightbox, or always show captions]. 1. Run discover_abilities with category foogallery-management. If the FooGallery abilities are not there, stop and tell me to install the free FooGallery plugin or update it to the latest version (it needs WordPress 6.9 or newer). If a FooGallery ability answers that it does not have the necessary permission, tell me to open any page of my WordPress admin once while signed in as an administrator (FooGallery sets up its gallery permissions there, and misses them when it was activated without an admin page loading, for example with WP-CLI), then try again. If it still answers that for one gallery, that gallery ID does not exist: check it with foogallery/list-galleries. 2. Run foogallery/list-galleries with search set to words from the gallery name and status any. If several match, show them with their photo counts and ask which one. If none match, run it again without search and show me the list. Then run foogallery/get-gallery with the gallery_id and note its layout and settings. 3. Run foogallery/list-layouts. Run foogallery/get-gallery-layout-schema for the gallery's current layout and, if I want a different layout, for that one too. Map what I asked for to setting ids and values in the schema of the layout the gallery will have: use only ids it lists; for a setting with choices, only one of its choices, because FooGallery saves any other value as the default without an error; a setting of type thumb_size or thumb_size_no_crop (thumbnail size) takes width and height as whole numbers instead of value, plus crop for thumb_size. If FooGallery refuses a thumbnail size, leave it out, send the rest, and tell me. Tell me anything you could not map. 4. If the layout changes: FooGallery resets every setting to the new layout's defaults unless it is sent in the same call. List the gallery's settings whose value differs from the current layout's default. Send each again with the same value if the new layout has a setting with that id and type and, for a setting with choices, that value among its choices; send a thumbnail size again with its width and height. Tell me the ones that cannot come along. 5. Find where the gallery is shown: run rest_api GET /wp/v2/pages and GET /wp/v2/posts, each with search foogallery, status publish,draft,private,pending,future, context edit, per_page 100 and _fields id,title,status,link,content (if 100 come back, ask for page 2). A post shows the gallery when its content has a FooGallery block (fooplugins/foogallery) with id GALLERY_ID, or a foogallery shortcode with id GALLERY_ID, or with gallery set to its ID or slug (get its slug with rest_api GET /wp/v2/foogallery/GALLERY_ID with context edit and _fields slug). This does not see galleries on other content types, such as products or courses, or placed with a page builder widget, a theme template or a sidebar widget. Show me the changes as a short before and after list, and where the gallery is shown. If any of those posts is published, or the gallery is published (it may be shown somewhere this search can't see), tell me visitors see the change as soon as it is saved. Wait for my yes. 6. Run foogallery/update-gallery once with the gallery_id, layout if it changes, and settings as a list of objects with id and value. Then run foogallery/get-gallery and check that each value I asked for, and each one carried over, reads back as sent. Report any that do not. 7. Give me the sentence to undo it, with the real values: Set the FooGallery gallery GALLERY_ID back to layout OLD_LAYOUT with these settings: OLD_SETTINGS, using foogallery/update-gallery. OLD_SETTINGS is the old value of every setting you changed, plus, if the layout changed, every setting that differed from the old layout's defaults.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Change a Gallery’s Layout and Look with FooGallery and AI” recipe from the WPVibe cookbook on my connected site.
A gallery that looked fine on launch day now feels wrong: too many columns on a phone, a bright lightbox on a dark site, uneven rows. FooGallery has dozens of settings per layout, spread over tabs, and switching layouts quietly drops the ones you set before.
Say what you want in plain words. The AI reads the gallery’s settings and the options of the layout it will use, maps your words to real settings, and carries your earlier choices across when the layout changes. It shows you the before and after, saves after your yes, then reads every value back, because FooGallery saves a value it doesn’t accept as the default without an error.
The change is live as soon as it is saved on any published page that shows the gallery, so the AI tells you where it is shown first. Keep the sentence it gives you: it puts the old layout and settings back. To change which photos are in the gallery, use this recipe.
Outcome
The gallery uses the layout and settings you asked for, each one read back, and you have the sentence that puts the old look back.