Title: Plugin [NextGEN Gallery] Image ID
Last modified: August 19, 2016

---

# Plugin [NextGEN Gallery] Image ID

 *  Resolved [gerben-van-eijk](https://wordpress.org/support/users/gerben-van-eijk/)
 * (@gerben-van-eijk)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-image-id/)
 * I am working with NextGEN gallery and currently I am adapting it to my website
   for several different needs, like showing videos on pages and such.
 * To do that I am using the plugin nextGEN custom fields, all goes well up to this
   point.
 * Where I am stuck is the following.
    I am sending the image ID with an URL to 
   another page and use the php GET function to get it there. But that’s where I
   get stuck, how do I use the id to call up NextGEN again in another page? since
   I want to be able to get the information from some of the custom fields I’ve 
   added, but to do that it needs to recognize the ID first.
 * So in short.
    What php code is used to recognize a NextGEN ID so I can then retrieve
   information connected to that image’s ID?

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

 *  Thread Starter [gerben-van-eijk](https://wordpress.org/support/users/gerben-van-eijk/)
 * (@gerben-van-eijk)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-image-id/#post-1069062)
 * Shameless bump.
 * Anyone please?
 * I just need the one tiny bit of PHP code which allows me to get information from
   NextGEN, be it the image url, caption, tags etc.. through an image ID.
 * Somebody on here’s got to know it.
 *  Thread Starter [gerben-van-eijk](https://wordpress.org/support/users/gerben-van-eijk/)
 * (@gerben-van-eijk)
 * [17 years, 1 month ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-image-id/#post-1069067)
 * Nevermind, I’ve managed to dig through both plugin php files and found a solution
   to retrieve data from the combined plugins on a new page.
 *  [dotherightthing](https://wordpress.org/support/users/dotherightthing/)
 * (@dotherightthing)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-image-id/#post-1069271)
 * Hi Gerben,
 * On the off chance that you are still wondering about this:
 * In /nggallery/lib/shortcodes.php – uncomment the two lines after:
    `// do_shortcode
   on the_excerpt could causes several unwanted output. Uncomment it on your own
   risk`
 * Now you can use the shortcodes in your PHP code.
 * So to output a gallery image based on its ID:
 *     ```
       $img_id = $_GET["id"];
       echo do_shortcode('[singlepic id="' . $img_id . '" w="600" h="400"]');
       ```
   
 * Dan

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

The topic ‘Plugin [NextGEN Gallery] Image ID’ is closed to new replies.

## Tags

 * [image id](https://wordpress.org/support/topic-tag/image-id/)
 * [nextgen](https://wordpress.org/support/topic-tag/nextgen/)

 * 3 replies
 * 2 participants
 * Last reply from: [dotherightthing](https://wordpress.org/support/users/dotherightthing/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-image-id/#post-1069271)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
