WOLF - WordPress Posts Bulk Editor and Manager Professional

How to use field gallery

  • Create meta field of type “Gallery” and press Save button
  • Enable it and press Save button
  • Add images you want for each post
  • Use function get_post_meta() to get attachments IDs in your own shortcodes or special gallery plugins. Example of gallery metafield data: 23,777,44,12,69

WOLF keeps in meta fields data IDs of images and you can draw them on front of your site as directly, so using shortcodes of any special gallery plugins.

Example of how to get links of images using their IDs:

$images = get_post_meta($post_id, '__YOUR_META_KEY_HERE__', true);

if (!empty($images)) {
    $images = explode(',', $images);
    foreach ($images as $img_id) {
        $image_url = wp_get_attachment_url($img_id);
        echo "<div style='background-image:url({$image_url});'></div>";
    }
}