Forums

[Plugin: NextGEN Gallery] Insert Gallery into template design code (6 posts)

  1. bestcssdesigns
    Member
    Posted 7 months ago #

    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???

  2. Jiahadye
    Member
    Posted 7 months ago #

    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.

  3. bestcssdesigns
    Member
    Posted 7 months ago #

    Hi,

    I tried that, but now the gallery isn't showing at all. Please see
    http://mountoliveadventist.org/

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

  4. nzahn
    Member
    Posted 7 months ago #

    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?

  5. diegpl
    Member
    Posted 7 months ago #

    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?

    Thanks!!!

  6. bekar09
    Member
    Posted 2 months ago #

    @Jiahadye thanks a lot. it works perfect.

Reply

You must log in to post.

About this Topic