Make image gallery non clickable

I am using following code to display images in gallery and code is working perfectly. But images shown in gallery are clickable. But i don’t want to make images clickable.

add_filter( ‘shortcode_atts_gallery’,
function( $out ){
if( !array_key_exists(‘link’, $out)
|| empty($out[‘link’])
)
$out[‘link’] = ‘file’;

return $out;
}
);

Read more here:: Make image gallery non clickable

Leave a Reply

Your email address will not be published. Required fields are marked *