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 );
  3.  
  4. function my_gallery_style() {
  5. return "<div class='gallery'>";
  6. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.