Title: [Plugin: NextGEN Gallery] How to use json.php
Last modified: August 19, 2016

---

# [Plugin: NextGEN Gallery] How to use json.php

 *  [jmather](https://wordpress.org/support/users/jmather/)
 * (@jmather)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-how-to-use-jsonphp/)
 * Can you give an example of how to use json.php? I have tried several different
   ways to get this working but I’m struggling.
 * I have this in my config:
    define(‘NGG_JSON_ENABLED’, true);
 * I would like to be able to query the gallery using jQuery with a load perhaps,
   but I can’t quite seem to get that to work…either way I get header already included
   errors.
 * If I include the json.php file in my templates, I will get the cannot modify 
   header error as well.
 * Perhaps a basic way to use the json.php script?

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

 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-how-to-use-jsonphp/#post-1460113)
 * I used json to get a similar result like with the great [Full screen Flickr Gallery](http://monc.se/kitchen/161/full-screen-flickr-gallery).
   For this purpose I’ve added this json lib (still in progress). As a first result
   you can get images with the follow callback :
 * `http://your.domain/callback=json&format=json&method=search&term=myterm`
 * there are more method added, just play a bit with the parameter “method”
 *  Thread Starter [jmather](https://wordpress.org/support/users/jmather/)
 * (@jmather)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-how-to-use-jsonphp/#post-1460144)
 * Ok, I think I missed the ?callback=json
 * Thanks for your help, sometimes it is just a simple thing. Is the callback parameter
   used by ngg or by wp?
 * Thanks..
 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-how-to-use-jsonphp/#post-1460153)
 * My fault… I didn’t update the source code, so you can’t know it.
 * It’s a NGG function, with this feature I didn’t need to know the path to the 
   plugin file which is much better : [http://alexrabe.de/2009/11/16/no-more-direct-calls/](http://alexrabe.de/2009/11/16/no-more-direct-calls/)
 *  [72quadrat](https://wordpress.org/support/users/72quadrat/)
 * (@72quadrat)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-how-to-use-jsonphp/#post-1460235)
 * I always get **JSON API not enabled. Add define(‘NGG_JSON_ENABLE’, true); to 
   your wp-config.php file** when i try to get the json callback.
 * I tried:
    [ this](http://kollektiv25.de/nggallery/page-87/album-1/gallery-25/?callback=json&format=json&method=search&term=myterm)
   and [that](http://kollektiv25.de/index.php?callback=json&format=json&method=search&term=myterm)?!?
 * How do you use json?
 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-how-to-use-jsonphp/#post-1460237)
 * And you have added this constant correctly ? Very strange
 *  [Alex Rabe](https://wordpress.org/support/users/alexrabe/)
 * (@alexrabe)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-how-to-use-jsonphp/#post-1460238)
 * Please note that my text contain a bug it should be NGG_JSON_ENABLED and not 
   NGG_JSON_ENABLE
 *  [Kissi](https://wordpress.org/support/users/kissi/)
 * (@kissi)
 * [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-how-to-use-jsonphp/#post-1460323)
 * Hi,
 * I also added **define(‘NGG_JSON_ENABLE’, true);** to my **“wp-config.php”** but
   it doesn’t work.
 * But I get no json callback, for Example with this url: [http://localhost/wp-content/gallery/album/?callback=json&format=json&method=search&term=myterm](http://localhost/wp-content/gallery/album/?callback=json&format=json&method=search&term=myterm)
 * is it even possible to get an json callback, when I don’t include the gallery/
   album into a page or post?
 * Can anyone help me, please?

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

The topic ‘[Plugin: NextGEN Gallery] How to use json.php’ is closed to new replies.

 * 7 replies
 * 4 participants
 * Last reply from: [Kissi](https://wordpress.org/support/users/kissi/)
 * Last activity: [15 years, 7 months ago](https://wordpress.org/support/topic/plugin-nextgen-gallery-how-to-use-jsonphp/#post-1460323)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
