<?php echo do_shortcode('[gallery]'); ?> on image.php not showing anything? (2 posts)

  1. Dave P.
    Posted 7 years ago #

    I'd like to show the entire gallery of images on each image page (image.php). I'm using the following code:

    <?php echo do_shortcode('[gallery]'); ?>

    Yet the gallery it does not show. It's in the loop.

    Any ideas?

  2. Dunkkan
    Posted 7 years ago #

    Hi, make sure you have write/load [gallery] also in your post, because only writing it in the template won't work.

    This 'order' just search for the shortcode in the post while the loop starts, to put the gallery elsewhere.

    I give this answer 'cause I'm pretty able to forget it :)

Topic Closed

This topic has been closed to new replies.

About this Topic