BLACK FRIDAY
Save 59% on PageForge Annual $191/year $485/year
Claim 59% Off →
Gallery Shortcode Style to Head icon
Possibly abandoned Tested up to 4.1.42 #94 in css

Gallery Shortcode Style to Head

Moves the gallery shortcode styles to the head so it doesn’t break XHTML validation; allows disabling or modifying the default gallery styles.

Active installs100+100+ tier
Downloads · 30d81▲ +15.7% vs prev. 30d
Rating5/51 reviews
Health score32/100At risk
All-time downloads11.9KSince Aug 2008
Support resolved—No recent threads
RequiresWP 3.3PHP any
Downloads · 7d21▼ -12.5% week over week
Our verdict

Consider an alternative

Gallery Shortcode Style to Head shows warning signs in 2026 — compare the alternatives below before installing. It runs on 100+ sites, is rated 5/5 and was last updated 12 years ago, and scores 32/100 on our health check.

  • Small user base (100+ active installs)
  • Very few reviews so far
  • No update in 11 years
  • Only tested up to WordPress 4.1 (latest is 7.1)

How does it stack up?

Side-by-side on installs, updates, ratings & support

Daily downloads

135Jul 17Aug 30Oct 14
Yesterday4
Daily average (1y)2
Peak day11May 7, 2026
Last 12 months637

Download spikes usually follow a new release — each site that auto-updates counts as a download.

Rankings

Where Gallery Shortcode Style to… stands today

WordPress.org search rankings

Live position in the plugin search, top 100
KeywordPositionCompeting pluginsCategory
css >100 10,000 Best css plugins →
gallery >100 4,375 Best gallery plugins →
shortcode >100 10,000 Best shortcode plugins →
style >100 10,000 Best style plugins →
xhtml #87 235 Best xhtml plugins →

Version adoption

Share of active sites per release.

  • 2.489.3%
  • 2.310.7%

Rating breakdown

★★★★★★★★★★ 5 from 1 reviews

  • 5★100.0%
  • 4★0.00%
  • 3★0.00%
  • 2★0.00%
  • 1★0.00%

About Gallery Shortcode Style to Head

From the official readme · v2.4

Description

Moves the gallery shortcode styles to the head so it doesn’t break XHTML
validation; allows disabling or modifying the default gallery styles.

By default when using the WordPress gallery, the styles are placed into the
post content which breaks XHTML validation. This plugin moves the style into
the head of the page using a look-ahead to determine if the [gallery]
shortcode is used in any posts.

This plugin also gives you the option to modify the default gallery style
CSS or disable the gallery styles entirely (so you can control it from your
template CSS files).

This plugin uses ideas recommended in a patch located at
https://trac.wordpress.org/attachment/ticket/6380/6380-style.diff

Special thanks to
* The original author: Matt Martz, http://sivel.net
* Serbo-Croatian (sr_RS) translation: Borisa Djuraskovic, http://www.webhostinghub.com
* Spanish (es_ES) translation: Ogi Djuraskovic, http://www.webhostinghub.com/

Installation

Installation is just like any other WordPress plugin:

  1. Upload the ‘gallery-shortcode-style-to-head’ folder to the ‘/wp-content/plugins/’ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

Immediately after installation, your galleries should pass W3C XHTML validation.
You can make further adjustments under Admin > Settings > Media.

Changelog

Correct an 'undefined variable' warning/error.

2.4 (2015-03-02):

  • Plugin is now translateable.
  • Code cleanup and support for latest WordPress.
  • Serbo-Croatian (sr_RS) translation by Borisa Djuraskovic, http://www.webhostinghub.com.
  • Spanish (es_ES) translation by Ogi Djuraskovic, http://www.webhostinghub.com/.

2.3 (2013-03-08):

  • Corrected ‘undefined varibale’ notice and RTL language detection.
  • Now requires WordPress 3.0 or higher.

2.2 (2012-12-11):

  • Support for WordPress 3.5 and its improved galleries.

2.1 (2011-01-15):

  • Removed clearing br tags in galleries (replaced with clearing div tags).
  • Corrected bug that threw a cryptic error on the media page for some users.
  • Support for WordPress 3.1; now requires WordPress 2.9 or higher.

2.0 (2010-05-02):

  • New gallery style settings on the Admin > Settings > Media page.
  • Ability to modify the default gallery styles.
  • Ability to disable the default styles entirely (so you can style the gallery in your template CSS).
  • Support for WordPress 3.0; now requires WordPress 2.7 or higher.

1.3 (2010-02-09):

  • Re-Sync with WordPress 2.9 gallery code for support of the new ‘include’ and ‘exclude’ options.

Full changelog on WordPress.org →

Screenshots

Plugin settings (under Admin > Settings > Media).
Plugin settings (under Admin > Settings > Media).

For developers

Is this your plugin? Show off the numbers.

Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.

Active installs badge Rating badge Health score badge

Best Gallery Shortcode Style to He… alternatives

All css plugins →
Alternatives
Rank Plugin Active installs Rating Updated Health
1 WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager WPCode Easily add code snippets in WordPress. Insert header & footer scripts, add PHP code… by Syed Balkhi 3M+ ★★★★★★★★★★ 4.9 (1.9K) 1 week ago 95
2 Code Snippets Code Snippets An easy, clean, and simple way to enhance your site with code snippets. by Code Snippets Pro 1M+ ★★★★★★★★★★ 4.7 (509) 3 days ago 95
3 Simple Custom CSS Plugin Simple Custom CSS Plugin Add Custom CSS to your WordPress site without any hassles. by John Regan 100K+ ★★★★★★★★★★ 4.7 (159) 2 years ago 51
4 Blocks Animation: CSS Animations for Gutenberg Blocks Blocks Animation: CSS Animations for Gutenberg Blocks Add CSS animations and scroll effects to any Gutenberg block. Choose from fade, slide, zoom… by Hardeep Asrani 90K+ ★★★★★★★★★★ 4.7 (71) 2 weeks ago 90
5 Widget CSS Classes Widget CSS Classes Add custom classes and ids plus first, last, even, odd, and numbered classes to your… by Jory Hogeveen 80K+ ★★★★★★★★★★ 4.9 (74) 2 years ago 56
6 Simple CSS Simple CSS Add CSS to your website through an admin editor, the Customizer or a metabox for page/post… by Tom 80K+ ★★★★★★★★★★ 4.9 (60) 1 year ago 58
7 WP Add Custom CSS WP Add Custom CSS Add custom css to the whole website and to specific posts and pages. by Daniele De Santis 60K+ ★★★★★★★★★★ 4.8 (89) 1 year ago 56
8 Clear Cache for Me Clear Cache for Me Purges cache on WPEngine, W3TC, WP Super Cache, WP Fastest Cache when widgets, menus… by webheadcoder 40K+ ★★★★★★★★★★ 4.8 (29) 4 months ago 75
9 WP-SCSS WP-SCSS Compiles .scss files to .css and enqueues them. by Connect Think 40K+ ★★★★★★★★★★ 4.3 (61) 8 months ago 60
10 Visual CSS Style Editor Visual CSS Style Editor Style your WordPress site visually. Discover the most popular front-end design plugin! Try… by YellowPencil 30K+ ★★★★★★★★★★ 4.1 (90) 2 months ago 83

FAQ

Gallery Shortcode Style to Head: quick answers

Straight answers, pulled from live WordPress.org data.

Live data from WordPress.org · checked Oct 15, 2026

Is Gallery Shortcode Style to Head free?

Yes. Gallery Shortcode Style to Head is free to download and use from the official WordPress.org plugin directory.

Is Gallery Shortcode Style to Head safe to use in 2026?

Gallery Shortcode Style to Head shows warning signs in 2026 — compare the alternatives below before installing. It runs on 100+ sites, is rated 5/5 and was last updated 12 years ago, and scores 32/100 on our health check.

How many websites use Gallery Shortcode Style to Head?

Gallery Shortcode Style to Head is active on 100+ WordPress websites and has been downloaded 11,925 times since it launched in August 2008. It was downloaded 81 times in the last 30 days.

Does Gallery Shortcode Style to Head work with WordPress 7.1?

Gallery Shortcode Style to Head is officially tested up to WordPress 4.1.42, while the latest release is 7.1.3. It may still work, but try it on a staging site first.

When was Gallery Shortcode Style to Head last updated?

The latest version, 2.4, was released on April 2, 2015 (12 years ago).

Who makes Gallery Shortcode Style to Head?

Gallery Shortcode Style to Head is developed and maintained by Matt Martz.

What are the best alternatives to Gallery Shortcode Style to Head?

The most popular alternatives to Gallery Shortcode Style to Head are WPCode (3M+ installs), Code Snippets (1M+ installs) and Simple Custom CSS Plugin (100K+ installs).

Powered by PageForge

Want thousands of pages that rank like these? Build them in an afternoon.

This directory runs on the same engine as PageForge. Turn any spreadsheet, CSV or API into thousands of fast, SEO-ready WordPress pages — with schema, internal links and AI-written copy baked in.

  • CSV, Google Sheets & API data sources
  • AI content, schema & internal links per page
  • Works with Elementor, Gutenberg, Yoast & Rank Math
  • Free on WordPress.org — no credit card
Sarah is here to help!
Hi there! 👋 Need help finding what you're looking for?
Sarah
Sarah
Online & Ready to Help
Hi there! 👋 Need help finding what you're looking for?

We'll use this to continue our conversation

Just now ✓ Verified

Join 500+ SEO Pros Scaling Their Strategy

Get exclusive programmatic SEO tactics, AI content workflows, and the latest PageForge updates delivered straight to your inbox. Stay ahead of the algorithm.

We care about your data in our privacy policy.