Compare Functionality in Pods 1.x to Pods 2.x

In Pods 2.0, we’ve simplified and cleaned up confusing names of functions and methods. Below is a comparison in case you’re familiar with Pods 1.x functionality. This will help you quickly migrate from any Pods 1.x site to Pods 2.x.

Note: Pods 2.x is backwards compatible with Pods 1.x code in most cases, but we still recommend you switch to the new syntax for future-proofing your site.

Compare Global Functions

FUNCTIONALITYPODS 1.XPODS 2.0
Run a SQL Querypod_query()pods_query()
Run Pods UI for Custom Admin screenspods_ui_manage()pods_ui()
MySQL Related functionsmysql_*()Don’t use them, use WPDB or pods_query()

Compare Pods object methods

FUNCTIONALITYPODS 1.XPODS 2.0
Get the Pods object$pod = new Pod( ‘pod’ )$pod = pods( ‘pod’ )
Get a field value$pod->get_field()$pod->field()
Display a field value$pod->get_field()$pod->display()
Find items$pod->findRecords()$pod->find()
Fetch the next item$pod->fetchRecord()$pod->fetch()
Get the current Pod item ID$pod->get_pod_id()$pod->id()
Get the pagination$pod->getPagination()$pod->pagination()
Get the search filters$pod->getFilters()$pod->filters()
Output a public form$pod->publicForm()$pod->form()
Total number of items found (regardless of ‘limit’)$pod->getTotalRows()$pod->total_found()
Total number of items returnedN/A$pod->total()

Compare PodsAPI object methods

FUNCTIONALITYPODS 1.XPODS 2.0
Get the PodsAPI object$api = new PodAPI()$api = pods_api()
Delete a Pod Item$api->drop_pod_item()$api->delete_pod_item()
Delete a Pod$api->drop_pod()$api->delete_pod()
Delete a Pod Field$api->drop_column()$api->delete_field()
Get a Pod Field$api->load_column()$api->load_field()
Save a Pod Field$api->save_column()$api->save_field()

Compare Tables

TABLEPODS 1.XPODS 2.0
Pod Item Indexeswp_podRemoved and fields pushed into individual pod tables
Pod Itemswp_pod_tbl_*wp_pods_*
Pod Relationshipswp_pod_relwp_podsrel
Podswp_pod_typesRemoved and converted into a Custom Post Type
Pod Fieldswp_pod_fieldsRemoved and converted into a Custom Post Type
Pod Templateswp_pod_templatesRemoved and converted into a Custom Post Type
Pod Pageswp_pod_pagesRemoved and converted into a Custom Post Type
Pod Helperswp_pod_helpersRemoved and converted into a Custom Post Type

Compare Other Functionality

FUNCTIONALITYPODS 1.XPODS 2.0
findRecords lookupsp.created, p.modifiedt.created, t.modified
Templates and Helpers$this points at the current Pod object$obj points at the current Pods object
Input HelpersAvailableNo longer supported
Multi-select FieldsReturn array of field data if 1 setReturn arrays of array field data whether it’s 1 or more

Other Helpful Documentation on Advanced Topics

REST API

ContentsOverviewQuick StartWordPress REST APICustom Fields, The REST API, Pods & YouExtending WordPress Default ObjectsHow It WorksPods Advanced Content Types, Custom Queries & More Overview Pods can be used to extend default WordPress REST API endpoints for any post types and taxonomies as well as the user routes. This functionality, which is managed from the Pods editor can be …

Read more

Roles & Capabilities in WordPress

Working with WordPress Roles & Capabilities for managing User Accounts and their access.

URL Rewrites & Custom Rewrites

When you need to change the URL structure or Rewrite Rules beyond what is provided in the Advanced Options Tab for the Custom Post or Custom Taxonomy.

Using Link Tables for multi-field relationships

We get a lot of questions about relationships with multiple fields. These extra fields give the relationship more context, like a date for example. In such a case you’ll need a so-called “Link Table” to combine this into one relationship. This can be an extra Pod, table based or meta based. ContentsSetup:Use cases:1: Recipe ingredients …

Read more