How to specify a class added to my gallery
Here are three methods Approach #1 It’s common to wrap the output with custom HTML. We can do that by using the post_gallery filter and the gallery_shortcode() callback: /** * HTML Wrapper – Support for a custom class attribute in the native gallery shortcode */ add_filter( ‘post_gallery’, function( $html, $attr, $instance ) { if( isset( … Read more