function display_image_gallery_shortcode($atts) { // Set up default attributes for the shortcode $atts = shortcode_atts( array( 'pod_name' => 'dogs', // Replace with your actual pod name 'field_name' => 'dog_gallery', // Replace with your actual image field name ), $atts, 'image_gallery' ); // Get the Pod $gallery = pods($atts['pod_name']); // Start the output buffer to return the HTML ob_start(); // Check if there are any items in the Pod if ($gallery->total() > 0) { // Start the gallery container echo ''; } // Return the gallery HTML return ob_get_clean(); } // Register the shortcode add_shortcode('image_gallery', 'display_image_gallery_shortcode');