Load the Instagram Feed Stylesheet Only Where Feeds Appear with Smash Balloon and AI
Stop Instagram Feed's stylesheet loading on pages without a feed, with each setting explained before anything changes.
Prerequisites
A site connected to WPVibe running Smash Balloon Social Photo Feed (the free Instagram Feed) 6.15 or newer or Instagram Feed Pro 6.14 or newer (tested on free 6.15.1 and Pro 6.14.0), on WordPress 6.9 or newer, with MCP Write Access turned on under Instagram Feed > Settings > General.
I use Smash Balloon Instagram Feed and want pages without an Instagram feed to stop loading its stylesheet. 1. Run discover_abilities with category instagram-feed. If there are no instagram-feed abilities, stop and tell me to install or update Smash Balloon Social Photo Feed (6.15 or newer, free) or Instagram Feed Pro (6.14 or newer), on WordPress 6.9 or newer. 2. Run instagram-feed/get-global-settings and instagram-feed/describe-settings-schema. Explain in one plain sentence each, with the current value: enqueue_css_in_shortcode (load the stylesheet only where a feed is shown) and enqueue_js_in_head (load the script in the head, on every page). 3. Suggest the change for a lighter site (enqueue_css_in_shortcode true, enqueue_js_in_head false) and say what it could break: a feed added some other way than the shortcode or block could show unstyled. Show me the planned change and wait for my yes. 4. On my yes, apply only what I approve with instagram-feed/update-global-settings, and tell me that on the free plugin saving it also clears every Instagram feed's cache, so feeds fetch their posts again. If an ability says AI write access is disabled, or the write abilities are missing from discover_abilities, stop and tell me to turn on MCP Write Access on the General tab of Instagram Feed's Settings. 5. Quote what Instagram Feed reported as updated and ignored, and list each change with its old value so I can spot-check it and undo it.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Load the Instagram Feed Stylesheet Only Where Feeds Appear with Smash Balloon and AI” recipe from the WPVibe cookbook on my connected site.
A speed test flags Instagram Feed’s stylesheet on pages that have no Instagram feed at all. The plugin’s script already loads only where a feed shows, but by default the stylesheet loads on every page. The setting that changes this sits among the advanced settings, where few people look.
The AI reads Instagram Feed’s global settings and explains the stylesheet and script options in plain words, with their current values. It suggests loading the stylesheet only on pages that show a feed and keeping the script in the footer, since loading it in the head puts it on every page. It applies only what you agree to and keeps the old values in the chat.
Paste the prompt, read the suggestions, and say which to apply. Afterwards open a page that has a feed and check it still looks right; if it looks unstyled, ask the AI to turn the stylesheet option back off. For the rest of the site’s render-blocking files, see Reduce render-blocking and unused CSS and JS with AI.
Outcome
Instagram Feed's stylesheet loading only on pages that show a feed, with the old values kept for an undo.