• Hi there, I’ve been making updates to a client site that was built with ACF Pro and I’ve come across some difficulties. I need to include an image gallery under some text, and nothing I do makes the images actually render on the front-end. I added a gallery to my field group and added in the following .php to that page template, from the documentation. I tried with and without specific image post IDs that I selected in the page editor WYSIWYG and both times, nothing. Every other field group and section of field group is working.

    <?php
    //images
    // Load value (array of ids).
    $image_ids = get_field('gallery');
    if( $image_ids ) {
    // Generate string of ids ("123,456,789").
    $images_string = implode( 540, 539, 547, 544, 546, $image_ids );
    // Generate and do shortcode.
    $shortcode = sprintf( 540, 539, 547, 544, 546, $images_string );
    echo do_shortcode( $shortcode );
    }
    ?>

    Thanks!

  • The topic ‘Gallery Field not appearing on front-end’ is closed to new replies.