Custom Gallery HTML only working when images are attached to post/page
You’re not passing your attribute array to the shortcode_atts method. You’re passing in an uninitialized variable. Your function starts with function get_my_gallery_content ( $atts ) { But then you don’t reference $atts again. The code is reading $attr, which is empty. Change the line ), $attr, ‘gallery’)); to ), $atts, ‘gallery’)); You also need to … Read more