Title: Manage pods fields groups programmatically
Last modified: May 17, 2024

---

# Manage pods fields groups programmatically

 *  Resolved [aquila76](https://wordpress.org/support/users/aquila76/)
 * (@aquila76)
 * [2 years ago](https://wordpress.org/support/topic/manage-pods-fields-groups-programmatically/)
 * Hello,
 * I would like to develop a PHP script that can add new fields to an existing group
   of pods of a certain type (which, if necessary, will first be added to another
   type of pod).
 * The two pod types will then be related, and when I manually change the first 
   one, the second one will also be quickly updated by running the script. Do you
   think this is possible? How?
 * I thought about using pods_api() first, but I don’t see any ready-made documentation
   at the moment, so I tried using add_post_metadata() and with that I can only 
   add new meta fields but not update the fields of the pod group. Finally, I also
   thought about using pod_register_group() but I can’t use it or maybe it doesn’t
   work to update existing groups…
 * Thank you for any help on what procedure could be followed and sorry for the 
   inconvenience, I know that it may not be an interesting or actually useful problem…
 * Best regards!
    -  This topic was modified 2 years ago by [aquila76](https://wordpress.org/support/users/aquila76/).

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

 *  Plugin Author [Jory Hogeveen](https://wordpress.org/support/users/keraweb/)
 * (@keraweb)
 * [2 years ago](https://wordpress.org/support/topic/manage-pods-fields-groups-programmatically/#post-17774557)
 * Hi [@aquila76](https://wordpress.org/support/users/aquila76/)
 * Please check our file based configurations: [https://docs.pods.io/code/registering-configurations/](https://docs.pods.io/code/registering-configurations/)
 * Cheers, Jory
 *  Thread Starter [aquila76](https://wordpress.org/support/users/aquila76/)
 * (@aquila76)
 * [2 years ago](https://wordpress.org/support/topic/manage-pods-fields-groups-programmatically/#post-17776951)
 * Hi Jory, thank you! I was trying using the same reference you just gave me and
   I’ve already set my snippet:
    1. I’ve copied and adapted json export output of the first pod the for register
       type of second pod via PHP
    2. with the load_fields API i’ve extracted, set and registered group fields for
       the second pod
    3. then i’ve added the full register function as action on init hook and all works
       as I needed!
 * Finally I will clone that new related pod to get all right ids to use them better
   and safetly (deactivating the snippet) i hope..
 * eventually see you for the next question.. meantime have always a good work for
   your fantastic framework!

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

The topic ‘Manage pods fields groups programmatically’ is closed to new replies.

 * ![](https://ps.w.org/pods/assets/icon.svg?rev=3286397)
 * [Pods - Custom Content Types and Fields](https://wordpress.org/plugins/pods/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/pods/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/pods/)
 * [Active Topics](https://wordpress.org/support/plugin/pods/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/pods/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/pods/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [aquila76](https://wordpress.org/support/users/aquila76/)
 * Last activity: [2 years ago](https://wordpress.org/support/topic/manage-pods-fields-groups-programmatically/#post-17776951)
 * Status: resolved