Create New Record from Form Submission using Add

Real life example of a function to create a Pods record from fields submitted on a form. <?php function add_new_applicant () { // Get field values from form submission $first_name = $_POST['first_name'] $last_name = $_POST['last_name'] $telephone = $_POST['telephone'] $email = $_POST['email'] $fields = array( 'first_name' => $first_name, 'last_name' => $last_name, 'telephone' => $telephone, 'email' => …

Read more

Pods-UI Customizations including re-ordering of Fields

From Andy Fuchs/Tiptronic /* Customize a pod including re-ordering */ $object = pods('test'); $fields = array(); /* collect all fields of the pod into an array */ foreach($object->fields as $field => $data) { $fields[$field] = array('label' => $data['label']); } /* add a WP default field */ $fields['content'] = array('label' => __('content')); /* if you want …

Read more

Working with Plugins

Integrating with other Plugins and special instructions for setting up specific plugins to work with Pods.

What is the XY Problem?

What is it? The XY problem is asking about your attempted solution rather than your actual problem. This leads to enormous amounts of wasted time and energy, both on the part of people asking for help, and on the part of those providing help. User wants to do X. User doesn’t know how to do …

Read more

How do I decide between a Custom Taxonomy or a Custom Post Type?

If your item (taxonomy or CPT) can stand alone by itself as a page of detail, it should be a CPT. If it can only exist as a group of things, it’s a Custom Taxonomy. For instance, I don’t feel Authors is a Custom Taxonomy of Books. They’re both Custom Post Types and related to …

Read more