Title: [Plugin: NextGEN Gallery] PHP code for slideshow
Last modified: August 19, 2016

---

# [Plugin: NextGEN Gallery] PHP code for slideshow

 *  [dhobeika](https://wordpress.org/support/users/dhobeika/)
 * (@dhobeika)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-php-code-for-slideshow/)
 * what is the correct PHP code to insert a slideshow into my template that displays
   photos from all galleries on my website? I am trying to use this and it does 
   not work:
 * `<?php echo do_shortcode('[slideshow id=x w=600 h=250]'); ?>`
 * When i set the id to a specific number like 1 or 2, it works fine. But I want
   the slideshow to cycle through ALL galleries, not just a specific one. Does anyone
   have any ideas?
 * I have also tried putting commas between all the galleries such as the code below
   and it did not work:
 * `<?php echo do_shortcode('[slideshow id=1,2,3,4,5 w=600 h=250]'); ?>`
 * The sidebar widget has an option to cycle through all the images in all the galleries
   and that works fine, but I am trying to add it onto the top part of my template
   and have been looking for a solution for weeks. If anyone can help, I would greatly
   appreciate it.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [donalyza](https://wordpress.org/support/users/donalyza/)
 * (@donalyza)
 * [16 years ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-php-code-for-slideshow/#post-1446604)
 * you may want to try this.
 *     ```
       <?php echo nggShowGallery(1,null) ?>
       ```
   
 * 1 being the nextgen id gallery.
 *  [zakir-devstars](https://wordpress.org/support/users/zakir-devstars/)
 * (@zakir-devstars)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-php-code-for-slideshow/#post-1446639)
 * Hi
    I am using following php code to display slideshow in home.php
 * <?php echo nggShowGallery(13) ?>
 * 13 is the gallery ID where there are some images and it displays correctly.
 * have a look [Gorilla](http://gorilla.londonmagento.com/)
 * But I want pagination, like 1 2 3 button where I can browse the images when I
   click any number. I am just wondering whether nextgen supports this or not.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: NextGEN Gallery] PHP code for slideshow’ is closed to new replies.

 * 2 replies
 * 3 participants
 * Last reply from: [zakir-devstars](https://wordpress.org/support/users/zakir-devstars/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-php-code-for-slideshow/#post-1446639)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
