How to call gallery from post parent in image.php template (1 post)

  1. ruibo
    Posted 6 years ago #

    I am trying to load the gallery from the post parent on an attachment page but can't seem to get it to load properly. Here is what I'm using

    <?php echo do_shortcode('[gallery id="<?php the_ID($post->post_parent); ?>"]'); ?>

    Is there anyway to call it without using the shortcode?

Topic Closed

This topic has been closed to new replies.

About this Topic