{"id":306,"date":"2013-07-03T23:22:34","date_gmt":"2013-07-04T03:22:34","guid":{"rendered":"http:\/\/www.bemdesign.com\/wordpress\/?p=306"},"modified":"2013-07-04T10:57:21","modified_gmt":"2013-07-04T14:57:21","slug":"creating-managing-and-displaying-custom-post-types-using-the-pods-framework-plugin-for-wordpress","status":"publish","type":"post","link":"https:\/\/www.bemdesign.com\/wordpress\/2013\/07\/03\/creating-managing-and-displaying-custom-post-types-using-the-pods-framework-plugin-for-wordpress\/","title":{"rendered":"Creating, managing, and displaying custom post types using the Pods Framework plugin for WordPress"},"content":{"rendered":"<p>This will be a bit of a tutorial on how to use the <a href=\"http:\/\/pods.io\/\" title=\"Pods Framework\" target=\"_blank\">Pods Framework<\/a> plugin to create, manage, and display custom post types in WordPress.<\/p>\n<p>First: Why use Pods as opposed to other options? One reason I like Pods is that you don&#8217;t have to write out a whole bunch of boilerplate code and create custom page templates to display your custom posts (although you certainly can if you want or need that depth of template customization). Pods also provides more flexibility by allowing you to use separate database tables to contain your custom post type as opposed to stuffing everything under the WordPress meta table (the default WordPress Custom Post Type behavior or like most other custom post type plugins).<\/p>\n<p>So <strong>Step 1<\/strong> install and enable Pods on your WordPress installation. (You don&#8217;t need a screenshot for this do you?) I would recommend you do this on a local development install first so you can get an idea of what&#8217;s happening before trying it on your site.<\/p>\n<p><strong>Step 2<\/strong> &#8211; Configure your Pod and enable some useful components.<br \/>\n<figure id=\"attachment_307\" aria-describedby=\"caption-attachment-307\" style=\"width: 150px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bemdesign.com\/wordpress\/wp-content\/uploads\/2013\/06\/Pods_admin.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.bemdesign.com\/wordpress\/wp-content\/uploads\/2013\/06\/Pods_admin.png\" alt=\"Pods admin menu item\" width=\"150\" height=\"33\" class=\"size-full wp-image-307\" \/><\/a><figcaption id=\"caption-attachment-307\" class=\"wp-caption-text\">Pods menu<\/figcaption><\/figure><\/p>\n<p>I recommend enabling Advanced Relationships, Packages (import and export your Pods &#8211; great way to test locally and then import into your live environment), and Templates.<br \/>\n<figure id=\"attachment_308\" aria-describedby=\"caption-attachment-308\" style=\"width: 600px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bemdesign.com\/wordpress\/wp-content\/uploads\/2013\/06\/Pods-component_screen.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.bemdesign.com\/wordpress\/wp-content\/uploads\/2013\/06\/Pods-component_screen.png\" alt=\"Pods component screen\" width=\"600\" height=\"366\" class=\"size-full wp-image-308\" \/><\/a><figcaption id=\"caption-attachment-308\" class=\"wp-caption-text\">Pods component screen<\/figcaption><\/figure><\/p>\n<p><strong>Step 3<\/strong> &#8211; come up with a great idea for a custom post. In my case, I wanted some functionality where we could manage a team by adding and removing members and displaying pertinent information about individual members.<\/p>\n<p><strong>Step 4<\/strong> &#8211; Create a new Custom Post Type using Pods (under the Pod&#8217;s Admin, select Add New).<br \/>\n<figure id=\"attachment_309\" aria-describedby=\"caption-attachment-309\" style=\"width: 837px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bemdesign.com\/wordpress\/wp-content\/uploads\/2013\/06\/Add-New-Pod.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.bemdesign.com\/wordpress\/wp-content\/uploads\/2013\/06\/Add-New-Pod.png\" alt=\"Add new Pod\" width=\"837\" height=\"506\" class=\"size-full wp-image-309\" \/><\/a><figcaption id=\"caption-attachment-309\" class=\"wp-caption-text\">Add new Pod<\/figcaption><\/figure><br \/>\nPods will ask you to fill in some information &#8211; don&#8217;t worry, you can always come back and update things after you&#8217;ve created it. In our case it will ask what type of object you&#8217;re creating (Custom Post Type (CPT), Custom Taxonomy, or even custom Settings Page). Select CPT (Custom Post Type).<figure id=\"attachment_310\" aria-describedby=\"caption-attachment-310\" style=\"width: 840px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bemdesign.com\/wordpress\/wp-content\/uploads\/2013\/06\/New-Pod.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.bemdesign.com\/wordpress\/wp-content\/uploads\/2013\/06\/New-Pod.png\" alt=\"Creating a new Pod\" width=\"840\" height=\"525\" class=\"size-full wp-image-310\" \/><\/a><figcaption id=\"caption-attachment-310\" class=\"wp-caption-text\">Create a new Pod<\/figcaption><\/figure><br \/>\nFill in the labels &#8211; the single label is what a single item will be called, the plural is what multiple items will be labeled. If you have enabled Pod&#8217;s Table configuration you can select the Advanced setting and configure it so your Custom Post Type will use it&#8217;s own database table (as opposed to using the meta-based which is WordPress&#8217; default). Be aware of the pros and cons of using this feature &#8211; a separate database table means more calls to the database but with the additional flexibility that can come from having a separate table.<\/p>\n<p><strong>Step 5<\/strong> &#8211; <figure id=\"attachment_313\" aria-describedby=\"caption-attachment-313\" style=\"width: 830px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bemdesign.com\/wordpress\/wp-content\/uploads\/2013\/07\/Newly-created-Pod.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.bemdesign.com\/wordpress\/wp-content\/uploads\/2013\/07\/Newly-created-Pod.png\" alt=\"A Custom Post Type Pod\" width=\"830\" height=\"366\" class=\"size-full wp-image-313\" \/><\/a><figcaption id=\"caption-attachment-313\" class=\"wp-caption-text\">A newly created custom post type Pod<\/figcaption><\/figure><br \/>\nNow it&#8217;s time to add in Fields for your Pod. Fields are a way to capture the information you want that relate to your Custom Post Type. In my case I want to capture the Name, Job Title, Email, and Photo. The id field I included as a way to query for the slug ID of the post &#8211; basically it&#8217;s useful info for behind the scenes and not used in the public display. I&#8217;ll cover why I did that later in this post. <figure id=\"attachment_315\" aria-describedby=\"caption-attachment-315\" style=\"width: 458px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/www.bemdesign.com\/wordpress\/wp-content\/uploads\/2013\/07\/Fields.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.bemdesign.com\/wordpress\/wp-content\/uploads\/2013\/07\/Fields.png\" alt=\"Manage Fields screen\" width=\"458\" height=\"538\" class=\"size-full wp-image-315\" \/><\/a><figcaption id=\"caption-attachment-315\" class=\"wp-caption-text\">The &#8220;Manage Fields&#8221; screen<\/figcaption><\/figure><br \/>\nPlease note the Name column &#8211; this is the name\/ID that you&#8217;ll use when pulling and displaying data from an individual item in your Pod.<\/p>\n<p>Okay we&#8217;ll call it quits here (this post is getting fairly long and heavy with images). I&#8217;ll pick it up in the next post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This will be a bit of a tutorial on how to use the Pods Framework plugin to create, manage, and display custom post types in WordPress. First: Why use Pods as opposed to other options? One reason I like Pods is that you don&#8217;t have to write out a whole bunch of boilerplate code and [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[20,21],"class_list":["post-306","post","type-post","status-publish","format-standard","hentry","category-technology","tag-pods-framework","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.bemdesign.com\/wordpress\/wp-json\/wp\/v2\/posts\/306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bemdesign.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bemdesign.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bemdesign.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bemdesign.com\/wordpress\/wp-json\/wp\/v2\/comments?post=306"}],"version-history":[{"count":11,"href":"https:\/\/www.bemdesign.com\/wordpress\/wp-json\/wp\/v2\/posts\/306\/revisions"}],"predecessor-version":[{"id":342,"href":"https:\/\/www.bemdesign.com\/wordpress\/wp-json\/wp\/v2\/posts\/306\/revisions\/342"}],"wp:attachment":[{"href":"https:\/\/www.bemdesign.com\/wordpress\/wp-json\/wp\/v2\/media?parent=306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bemdesign.com\/wordpress\/wp-json\/wp\/v2\/categories?post=306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bemdesign.com\/wordpress\/wp-json\/wp\/v2\/tags?post=306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}