Getting Started with Pods framework in WordPress [Beginner Tutorial]

Pods is a WordPress plugin or more appropriately framework for WordPress that allows you to create, extend, manage, and deploy customized content types and fields. If you have just installed Pods plugin in WordPress setup and activated it and you are thinking what to do next then this tutorial is for you. This is a basic step by step tutorial for tasting what Pods can offer and be ready to dive into it.
Here we are going to setup Pods for creating content type ‘Phone’ in which it would contain basic features like title, introduction, picture, OS, screen size, etc. We will then make the listing page of phones in the front end and also page for displaying content of the single phone. Pods 2.1 is used in this tutorial.

Pods setup

  • When you click Pods Admin available in the sidebar after activating the Pods plugin, you get following in the screen.
  • Click Create New. You will get a form to setup new content. Enter ‘Phones’ in Plural Label box and ‘Phone’ in Singular Label box. Select Content Type ‘Custom Post Type (like Posts or Pages)’ as default. If you want to learn about content types available, you can see this link
  • Click Next Step
  • Our Phone pods in created. Now we are ready to add fields we want to add about Phone. Click Add Field.
  • Enter ‘Operating System’ in Label. Label is how the field is displayed in the UI. When you focus out from the textbox, Name should be ‘operating_system’. This is the name which we will need in future to access data programatically. In Description enter description of the field. Select Field Type as Plain Text. There are lots of options for different types of fields.
  • Click Add Field just below the new field form to add field.
  • Similarly add new field for Screen Size. Label : Screen Size. Name : screen_size. Description : Screen Size (in inch). Select Field type as Plain Number. In Additional Field Options, enter 2 in Decimals textbox.
  • For picture, we need to add another field. Label : Picture. Name : picture. Description : Picture of the phone. Select File/Image/Video in Field Type
  • Click Save Pod

Setting up Pages

  • Pods comes with builtin components named Pages and Templates. It may not be activated in first installation. If not then, go to Components under Pods Admin menu. Find Pages and Templates and click Enable if it is disabled previously.
  • Ans also make sure that you have selected ‘Pretty Permalinks‘ in WordPress permalink structure.
  • Go to Pods Admin > Components > Pages menu.
  • Click Add New
  • Enter ‘phones’ in the main textbox (showing Enter URL here) and paste following code in the ‘Page Code’.
  • This is the listing page og Phone pods
  • Click Publish to save.
  • Again click Add New
  • Enter ‘phones/*’ in the main textbox and paste following code in the ‘Page Code’.
  • Click Publish to save.
  • This page is for displaying description of single Pods.

Setting up Templates

  • As you have noticed, in the above code there is use of two templates ‘phone_list’ and ‘phone_detail’. Those pages would use that templates to display the data grabbed from the Pods.
  • Go to Pods Admin > Components > Templates menu.
  • Click Add New
  • Enter ‘phone_list’ in the main textbox (showing Enter Template name here) and paste following code in the ‘Content’.
  • Click Publish to save.
  • And now lets create ‘phone_detail’ template.
  • Click Add New
  • Enter ‘phone_detail’ in the main textbox and paste following code in the ‘Content’.
  • Click Publish to save.

Finalising

  • Our Pods setup is complete now. So lets create some new Phone items. In the left menu in WordPress, you should be seeing ‘Phones’ menu. Go to Phones menu and click Add New
  • Now you can see a familiar form along with the extra input fields. Enter phone info in the inputs. Select an image in the ‘Picture’. And then click Publish to save.
  • Enter more few phones. To see pagination in the page you need to more than 2 items as we have set per page 2 items while fetching pods items in the listing page.
  • To see how it looks in the front side, go to SITE-URL/phones in the browser. If you have done correctly then you can see the list of phone items.
  • Click in the title of the phone and it will go to the detail page where you can see the detail description of the single phone.

See, how easily you have created custom content in WordPress with your required fields and displayed in the front end. This is not all about Pods. This is just the beginning. Try yourself and you will feel it.

Pods Framework : A WordPress plugin to convert blogging system into awesome Content Management System

Pods is a plugin based on WordPress that easily extends the features of the WordPress system and make advanced CMS. Pods can be defined as ‘a framework for WordPress that allows you to create, extend, manage, and deploy customized content types and fields’, according to official page. WordPress has limited types of posts. There are five major post types that WordPress uses by default; Page, Post, Attachment, Revisions and Nav menus.
After WordPress 3.0, it gave us the capability to add our own custom post types and to use them in different ways. And then Pods framework revolutionized with that feature and developed a model for easy creation and implementation of custom post types.

Pods Framework

With Pods you can create new Post Types and Taxonomies, or extend any existing content type in WordPress including Post Types, Taxonomies, Media, Users, and Comments. Even more Advanced Pods allows us to have a base content type and add the fields and features we want.

Pods  provides a platform on which to build our own content types to manage along with great advanced functionality to have. Pods allows us to add context to content. We can assign Pods their own menu item with one easy click. Pods gives us easy URL rewriting and page templates.


Getting Started

Pods Homepage : Pods Framework
Download Pods: Download
Documentation : Pods Docs
Pods Official Forum : Forum

While understanding about Pods and its usefulness, one should also have knowledge about its cons. There is a list of pros and cons of Pods CMS and Custom Fields listed by a web developer and blogger Mike Van Winkle. It might clear the picture more.


Pods CMS

Pros

  • Fully customizable backend. You can specify exactly what fields the end user sees for any given content type.
  • Public form support makes setting up forms for adding content on the front end relatively easy.
  • Field formats are customizable, which means your database is only going to be as big as it needs to be. This also means your site will be more scalable.
  • Fields are relate-able. This is the biggest benefit to Pods.

Cons:

  • Not supported by WordPress development team. This is truly a plugin and WordPress is hesitant to support it. The good news is the Pods user base is growing rapidly and the bigger it gets, the less we will have to worry about this.
  • Pods content is not added to WordPress posts table by default which means it is not available to native WordPress functions, like comments and Akismet, and is inaccessible to many plugins, like WP-PostViews.
  • Because of the complicated relational database, SQL queries are more difficult than with custom fields. Though you can do more with Pods not using SQL than you can with custom fields using SQL.

Custom Fields

Pros:

  • Native to WordPress. Does not require plugin installation to function and all posts are immediately connected to other WordPress plugins and functions
  • All fields are text formatted, which means once you know how to output one custom field, you can output them all.
  • Most plugins are already compatible with Custom Fields.

Cons:

  • Queries with custom fields can be complex and convoluted. Sometimes you will need a “Custom Select Query” in order to accomplish your task.
  • All fields are in LONGTEXT format, which means the database will be larger than it needs to be and this could put limits on the scalability of your site
  • End User support is still limited. The WordPress Dashboard, even with the mentioned plugins, is not fully customizable.

Comparison between these two can also be found here [Pods Vs Custom Post Types].

You have now understood advantages and disadvantages of both type. Its completely upon you which fits your requirement and with which you are comfortable.