Skip to main content
Cookbook Maintenance FooGallery

Check Your FooGallery Galleries for Problems with AI

Hidden, broken, empty and unused FooGallery galleries found in one read-only report.

Difficulty Beginner
Time ~5 min

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.

The prompt
My WordPress site uses FooGallery. Check my galleries for problems. Don't change anything.

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 status any and limit 100. While fewer galleries are listed than its total, run it again with offset raised by 100.
3. Find every page and post that shows a gallery: 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). In each, note the gallery IDs in FooGallery blocks (fooplugins/foogallery with id) and foogallery shortcodes (with id, or with gallery set to an ID or a slug; for a slug, find its ID with rest_api GET /wp/v2/foogallery with slug set to it, status publish,draft,private, context edit and _fields id,slug,status, and flag one that finds nothing).
4. For each gallery, run foogallery/get-gallery with the gallery_id and include_attachment_detail true, and flag: a status other than publish while it is on a published page (visitors see nothing there, with no message); attachment_count 0; IDs in attachment_ids that are not in attachments (those photos were deleted from the media library); photos whose alt is empty (give the count); not found on any page or post (it may be unused, or on other content such as products or courses, or placed by a page builder widget, a theme template or a sidebar widget, which this check can't see). If a gallery's datasource is not media_library, say its photos come from somewhere else and skip the photo checks for it.
5. Flag every gallery ID found on a page or post that is not in the gallery list: that gallery was deleted, is in the trash, or is not draft, published or private, and the spot shows nothing.
6. Report each gallery with its title, status, photo count, where it is shown and its problems, then the pages that show a missing gallery, then the single most important thing to fix first. Offer the fixes as next steps, each only after my yes: publishing a gallery that is on a published page (foogallery/update-gallery with status publish), and writing missing alt text.
Already connected?

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

Run the “Check Your FooGallery Galleries for Problems with AI” recipe from the WPVibe cookbook on my connected site.

Gallery problems are quiet. A gallery saved as a draft shows nothing on a live page, a photo deleted from the media library leaves a gap, a gallery that was deleted leaves an empty spot, and no message tells you. You find out when a visitor asks where the photos went.

The AI lists every FooGallery gallery, reads its photos, and finds every page and post that shows one. It reports galleries that are not published but sit on a published page, galleries pointing at photos that no longer exist, empty galleries, photos with no alt text, galleries that are not on any page, and pages that show a gallery that no longer exists. It changes nothing.

The check finds galleries placed with a FooGallery block or shortcode on pages and posts. A gallery on a product, a course or other content, or placed with a page builder widget, a theme template or a sidebar widget, isn’t seen, so a gallery listed as not on any page may still be in use. To fix missing alt text, use this recipe.

Outcome

A report of what is wrong with your galleries and where, with the first thing to fix, and nothing changed.