Support

Account

Home Forums Add-ons Gallery Field Jetpack carousel for gallery field Reply To: Jetpack carousel for gallery field

  • I just read this here: http://jetpack.me/support/carousel/

    With Carousel active, any standard WordPress galleries you have embedded in posts or pages will launch a gorgeous full-screen photo browsing experience with comments and EXIF metadata.

    This means that if you have jetpack carousel active and you put your images into a WP gallery that it will automatically cause it to be a jetpack carousel.

    So the code you need is almost exactly what is in the acf gallery document I linked to above. Her it is with a little more detail and commenting.

    
    <?php 
        // replace 'gallery' below with the name of your field
        $image_ids = get_field('gallery', false, false);
        // do a little test to make sure images were added
        // to prevent php error
        if (is_array($image_ids) && count($image_ids)) {
            $shortcode = '[gallery ids="' . implode(',', $image_ids) . '"]';
            echo do_shortcode( $shortcode );
        }
    ?>
    

    If you copy and paste that into your template where you want the carousel to appear it should work.