Support » Plugins » [Plugin: NextGEN Gallery] Insert Gallery into template design code

  • Hey,

    I got the NextGen Gallery for my website. I wanted to put the slideshow into the template design code but I put [ slideshow id=x w=width h=height ] into the templates design code but the slideshow didn’t show up. What can I do to have the slideshow work???

Viewing 10 replies - 1 through 10 (of 10 total)
  • G’day Mr.bestcssdesigns,

    The reason your code won’t work within the template files is because it’s a short code (WordPress fishes through your post text to try and find these, then executes it accordingly). Inserting a short code straight into your PHP files is the same as inserting plain text.

    If there isn’t an alternative to using the short code, you can use it within a php hook (do_shortcode), depending on what version of WP you’re using.

    <?php echo do_shortcode('[slideshow id=x w=width h=height]'); ?>

    Hope this helps. I just used this on a project I’m working on and it worked fine, so if it doesn’t work for you, check that you have the latest versions of NextGen and WP installed.


    I tried that, but now the gallery isn’t showing at all. Please see

    Its supposed to be at the top Ministries and Spiritual Nuggets.

    Jiahadye, thank you for this info, however I was wondering how do you populate the id for the slideshow from the post id? With a MySQL SELECT clause?

    Please, the option “show the next image when click” is not working with this code:

    <?php echo do_shortcode(‘[slideshow id=x w=width h=height]’); ?>

    All the other options function all right…
    Someone here can help-me?


    @jiahadye thanks a lot. it works perfect.

    It works! 🙂
    It can’t have space between [] and content.

    <?php echo do_shortcode(‘[ slideshow id=x w=width h=height ]‘); ?>

    <?php echo do_shortcode(‘[slideshow id=x w=width h=height]’); ?>


    I had problems with this version of the do_shortcode:
    <?php echo do_shortcode('[slideshow id=x w=width h=height]'); ?>

    So, after looking around more, I found that the correct version of this code should read like this:
    <?php echo do_shortcode('[nggallery id=x w=width h=height]'); ?>

    For some reason, slideshow didn’t work and nggallery did. This is an FYI for others who suffered my pain!

    Funny enough
    <?php echo do_shortcode('[slideshow id=1 w=400 h=599]'); ?>
    works fine on my localhost but not in the live site

    I changed to:
    <?php echo do_shortcode('[nggallery id=1 w=400 h=599]'); ?>
    and it worked.

    My hosting service is using PHP 5.2.10

    Do you think that the PHP version has something to do with it?

    The slideshow looks so much better.

    hey… Is anyone know the php code for galleryview
    Please post if anyone know this

    Hey guys,

    I have a question. Is it possible to have a slideshow off to the side of a wall of text like as in two columns and such? If so, how is this done? I’m pretty new to all this stuff, sorry if it’s such a simple answer.

    Here is my current design:

    And if you look at the Slider Feature – Meet the Staff – you will see that the slideshow is above the text as opposed to the other Slider Features with just a picture that has text to the left of it.

    So, again, is there a way to set the slideshow to be off to the right of a wall of text? Thanks so much for any assistance.

    – Peter

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: NextGEN Gallery] Insert Gallery into template design code’ is closed to new replies.