This seemed pretty trivial, but I am struggling a lot.
I am trying to get an NGG gallery to show outside the canonical post place in my template. Therefore the shortcode won’t work, so I tried with:
<?php echo do_shortcode('[slideshow=255]'); ?>
(yes I am using NGG prior to 1.x)
and also tried modifying this one which I am successfully using:
<?php $gal = get_post_meta($post->ID, 'gallerypopup', true); $gal = apply_filters('the_content', $gal ); echo $gal; ?>
both to no avail. How do I call the shortcode in my template outside the post? If this can help, I am also using the above $gal variable within the loop for other purposes, so if this simplifies things, there you go.
Thanks for any help.
- The topic ‘[Plugin: NextGEN Gallery] Short code anywhere outside of post loop?’ is closed to new replies.