Viewing 1 replies (of 1 total)
  • Thread Starter coolhatwebdesign

    (@coolhatwebdesign)

    Solved it using the following method:

    First in ACF (with the NG add-on enabled), I created the custom field and made sure the output of the field was for the NextGen Gallery ID (not an array of images). I called the custom field photo_gallery.

    Then in my template, I used the following code:

    $post_id = $GLOBALS['post']->ID;
    $photo_gallery = get_field('photo_gallery',$post_id);
    ?>
    <?php
     if ($photo_gallery){
    echo '<h4 class="widget-title widgettitle">More Images</h4>';
    echo do_shortcode('[ngg_images gallery_ids="'.$photo_gallery.'" display_type="photocrati-nextgen_basic_thumbnails"]');
     } // end if photo_gallery
    ?>

    This way, the shortcode is enabled and the spot where the ID number goes is where my custom field’s output is placed and the shortcode does the rest. Just tested it out and it worked!

Viewing 1 replies (of 1 total)
  • The topic ‘Only the word "Array" shows where my field should display’ is closed to new replies.