I have created a meta box with editor using advanced custom field plugin
This meta box displays a text editor from which i am able to create and add Gallery to the post.
But while retrieving the gallery data.
$gallery = get_post_meta($post->ID, 'gallery', true);
echo $gallery;
this displays
[gallery ids="53,54,55,56"]
Generally, the gallery data can be retrived like
$galleries = get_post_gallery_images( get_the_ID() );
But this does not seem to work if I am using a meta box to save the gallery.
Is there a wordpress way to get the gallery images and loop through them and display those image in lightbox or should i try any other method?
This did the trick
What should be done is
which will create a array of ids then I can loop through the images by