WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. bestcssdesigns
    Member
    Posted 5 years 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 5 years 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 5 years 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 5 years 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 5 years 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 4 years ago #

    @Jiahadye thanks a lot. it works perfect.

  7. janabevilacqua
    Member
    Posted 4 years ago #

    It works! :-)
    It can't have space between [] and content.

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

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

    Thanks!

  8. micasuh
    Member
    Posted 4 years ago #

    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!

  9. gracebarreiros2
    Member
    Posted 4 years ago #

    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.

  10. anujasha9
    Member
    Posted 4 years ago #

    hey... Is anyone know the php code for galleryview
    http://alexrabe.de/2009/10/27/galleryview/
    Please post if anyone know this
    thanks

  11. sc0o8i3
    Member
    Posted 4 years ago #

    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:

    http://peter.visualprospect.com/clients/stlucy/

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags