WordPress.org

Ready to get started?Download WordPress

Plugin Directory

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.

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 http://trac.wordpress.org/attachment/ticket/6380/6380-style.diff

Special thanks to the original author of this plugin, Matt Martz, http://sivel.net.

Requires: 3.0 or higher
Compatible up to: 3.5.2
Last Updated: 2013-3-9
Downloads: 7,388

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,2,2
100,3,3
100,1,1
50,2,1
0,1,0