My code
<`li><img src="<?php echo get_post_meta($post->ID, '_for-gallery', true); ?> " alt=""></li>`
The code should give this:-
<img src="Array" alt="" draggable="false">
But the code is giving this:-
<img src=" " alt="" draggable="false">
When you use
get_post_meta
function with $single as true just get the first element, but false get all elements separated by comma.Looking your code, i suppose that custom_field is an url, in that case, why you need get an array as a url? you must get a string...
You can check here: https://developer.wordpress.org/reference/functions/get_post_meta/