Wordpress - Remove inline style from default gallery

/ Published in: PHP
Save to your folder(s)

Add this to your functions file

Copy this code and paste it in your HTML
  1. //Remove default inline gallery styling
  2. add_filter( 'gallery_style', 'my_gallery_style', 99 );
  4. function my_gallery_style() {
  5. return "<div class='gallery'>";
  6. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.