[resolved] [Plugin: NextGEN Gallery] How can I show a gallery using PHP in a template? (3 posts)

  1. korythewebguy
    Posted 8 years ago #

    I'd like to be able to show a gallery by using PHP code in a template, rather than using the shortcode in a Page or Post.

    By activating the NextGEN Widget, I'm able to use the nggDisplayRecentImages() function, but as best I can tell I can't make it display images from a specific gallery.

    As always, any thoughts, suggestions, or even flames are HUGELY appreciated - Thanks in advance to all who reply!

  2. WhisperT
    Posted 8 years ago #

    Answer is here: http://wordpress.org/support/topic/172478?replies=8#post-746396

    Hope thats what your searching for.

  3. korythewebguy
    Posted 8 years ago #

    Brilliant! I tweaked the code just a bit, but this was essentially just what I needed...

    $showgallery = '[gallery=3]';
    $showgallery = apply_filters('the_content', $showgallery );
    echo $showgallery;

    Thanks for the quick reply, WhisperT - You're wonderful! :-)

Topic Closed

This topic has been closed to new replies.

About this Topic