Title: [Plugin: NextGEN Custom Fields]
Last modified: August 20, 2016

---

# [Plugin: NextGEN Custom Fields]

 *  [joseph.c.lawrence](https://wordpress.org/support/users/josephclawrence/)
 * (@josephclawrence)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-custom-fields/)
 * As it stands, with NextGEN Custom Fields plugin you have to manually add a custom
   field you have created to each new gallery after you have created that gallery.
   I want to tweak the plugin code a bit so that all gallery custom fields that 
   I have created automatically get added to each new gallery, when those galleries
   are created. I realise this code customisation might not survive an update of
   the plugin, but I would love to know how best to do it now.
 * Thanks in advance for any advice.

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

 *  [shauno](https://wordpress.org/support/users/shauno/)
 * (@shauno)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-custom-fields/#post-2403163)
 * Hey Joseph
 * I’m not sure I understand. When you add a new custom field, you have a list of
   all galleries to link it to.
    When you add a new gallery, you have a list of 
   all custom fields to link to the gallery.
 *  Thread Starter [joseph.c.lawrence](https://wordpress.org/support/users/josephclawrence/)
 * (@josephclawrence)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-custom-fields/#post-2403167)
 * Yep, when you go through the normal process of creating a gallery, but I use 
   an Adobe Lightroom plugin that creates galleries as part of the upload process(
   basically exporting photos from a desktop app directly into nextGEN and creating
   the gallery like that. So I want to know if I can have a process that just automatically
   adds the custom fields to all galleries, without any checkboxes having to be 
   ticked etc.
 *  [shauno](https://wordpress.org/support/users/shauno/)
 * (@shauno)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-custom-fields/#post-2403170)
 * Ah, I see.
    NGGCF currently links the fields to the galleries in a link table.
   If the Lightroom plugin is calling NextGEN APIs, then it would be possible to
   latch onto the NextGEN hooks, and write a separate plugin to auto link all new
   galleries to all custom fields. My guess that that it just creates the entries
   straight in the database though.
 * Without editing the Adobe plugin, I could make a new setting that makes fields
   link to ALL galleries automatically.
 * It would just take some thought on how to handle turning that option off. If 
   that option later turned off for a field, would the field be unlinked from ALL
   galleries, or would it stay linked to existing galleries, and just not automatically
   link to new ones…
 *  Thread Starter [joseph.c.lawrence](https://wordpress.org/support/users/josephclawrence/)
 * (@josephclawrence)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-custom-fields/#post-2403173)
 * Well for my purposes it is totally fine if you can never turn it off, so any 
   gallery custom fields that are created are just always added to all galleries,
   and there is no choice in the matter for a user…
 *  [shauno](https://wordpress.org/support/users/shauno/)
 * (@shauno)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-custom-fields/#post-2403185)
 * I’ve got thousands of other users to keep happy too 🙂
 * I’ve got a bit of a plan on how I think I can go about it, but I just need to
   find the time. My day job is pretty crazy right now, plus with the festive season
   my private geek time is short.
 *  Thread Starter [joseph.c.lawrence](https://wordpress.org/support/users/josephclawrence/)
 * (@josephclawrence)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-custom-fields/#post-2403212)
 * 🙂
 * Yes of course – I appreciate you helping out so far. I was hoping there might
   be a small tweak that could be applied, but alas.
 * I’m excited to hear your solution if you find one – totally understand you don’t
   have time to just jump on this at the drop of a hat!
 * Thanks a lot.
 *  [shauno](https://wordpress.org/support/users/shauno/)
 * (@shauno)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-custom-fields/#post-2403214)
 * Change line 276 to `$qry = "SELECT * FROM ".$wpdb->prefix."nggcf_fields WHERE
   ngg_type = ".$wpdb->escape($ngg_type);`
 * That will return all fields all the time.
 * Obviously it will be overwritten with any updates, but that should work for now.
 *  Thread Starter [joseph.c.lawrence](https://wordpress.org/support/users/josephclawrence/)
 * (@josephclawrence)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-custom-fields/#post-2403238)
 * LEGEND. Please find yourself donated to.
 *  [shauno](https://wordpress.org/support/users/shauno/)
 * (@shauno)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-custom-fields/#post-2403256)
 * Glad to help, and thank you for the donation!

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

The topic ‘[Plugin: NextGEN Custom Fields]’ is closed to new replies.

## Tags

 * [custom fields](https://wordpress.org/support/topic-tag/custom-fields/)
 * [nextgen](https://wordpress.org/support/topic-tag/nextgen/)
 * [NGG](https://wordpress.org/support/topic-tag/ngg/)

 * 9 replies
 * 2 participants
 * Last reply from: [shauno](https://wordpress.org/support/users/shauno/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-nextgen-custom-fields/#post-2403256)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
