Add Filter for Do Shortcode in Pods Template
If you want to make sure shortcodes are automatically ran against all Pods Templates, this filter will make that change.
Enabling Shortcodes in Pods Templates
This piece of code can allow shortcodes to be processed in Pods Templates.
PodsCast #3 Displaying Data Index & Archive Template
This particular template is based off of Twenty Fifteen and works for both the Single & Index/Archive & Search.
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' …
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 …
Single Actor Detail from PodsCast #4
<?php /* Template Name: Actor Detail */ ?> <?php get_header(); ?> <!– Row for main content area –> <div class="small-12 large-8 columns" id="content" role="main"> <?php /* Initiate the Pods Object */ // get the current slug /* $slug = pods_v( 'last', 'url' ); */ global …
Single-Video Detail from PodsCast #4
<?php /* Template Name: Video Detail */ ?> <?php get_header(); ?> <!– Row for main content area –> <div class="small-12 large-8 columns" id="content" role="main"> <?php /* Initiate the Pods Object */ // get the current slug global $post; // get pods object // $post->post_type can …
Archive-Video from PodsCast #4
Shows how to construct a standard post type archive using Pods functions to control the loop and field display.
Multiple Fields in a Drop Down Relationship Pick List Using a Filter
When you need to change what is shown in the drop-down Select Field in a Relationship, you can use this method to base the value on other values in Post Type.
Order by Numeric Field in Shortcode
This method can also be used to handle any CAST by specific type order by. <?php /** * WordPress stores all meta fields as strings, which causes problems for ordering by numbers. When using Pods::find() directly, this issue can be addressed by casting the field …