wordpress snippets last updated   : July 14, 2014
we now have 634 snippets

Remove inline style from gallery shortcode

wordpress snippet

The WordPress gallery shortcode will add some inline CSS to your document however if I’m like many of you, I would rather use my own. Adding the above snippet to the functions.php of your wordpress theme will disable the default gallery styles from being inserted into the page.

snippet :  PHPcopy
add_filter( 'use_default_gallery_style', '__return_false' );

  • Webminky

    Thanks muchly, been trying to get rid of that for a while!

    • http://wpsnipp.com Kevin Chard

       no problem glad that I could help

jqsnipp.com | we just launched jquery snippets website