Code Snippets

Collections of all of our Hook & Filters, Pods Templates and Template Examples

Enabling Shortcodes in Pods Templates

Posted in , ,

This piece of code can allow shortcodes to be processed in Pods Templates.

PodsCast #3 Displaying Data Index & Archive Template

Posted in , ,

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

Posted in ,

Real life example of a function to create a Pods record from fields submitted on a form.

Could also have a run through pods_sanitize to make sure the data is safe to be added.

Pods-UI Customizations including re-ordering of Fields

Posted in ,

From Andy Fuchs/Tiptronic

 

Single Actor Detail from PodsCast #4

Posted in ,

 

Single-Video Detail from PodsCast #4

Posted in ,

 

Archive-Video from PodsCast #4

Posted in ,

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

Posted in , , , , ,

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

Posted in

This method can also be used to handle any CAST by specific type order by.

 

Date Format Output Filter for Magic Tags

Posted in , ,

Provide different date format options to your date fields using an Output Filter for your Magic Tag.