Pods Basics: Installation and Setup
Published 4 years 2 months ago on January 4, 2010 — 7 min read
Installing Pods is equally easy as installing any other WordPress plugin. You can either use the built in admin installer, or upload the plugin files to your
plugins directory. Once installed, go ahead and activate Pods. You may receive a not-so-pretty notice letting you know that you need to modify your
.htaccess file. This is so Pods Pages can work properly using SEO friendly slugs (just like WordPress does). Pods offers a text file from which you can copy an acceptable
.htaccess file, and even tells you where the file needs to be on your server.
Once installed, Pods gives itself an entry in the admin sidebar:
Under the Pods entry in the sidebar are a number of additional links.
- Browse Content
- Allows you to browse all the content in the Pods database tables.
- Package Manager
- Pods has a built in import/export system which allows your existing Pods to be portable.
- Menu Editor
- Pods also allows you to build a navigation structure based on your existing Pods much like WordPress Pages.
- Add country, Add state
- These are existing Pods included by default. You can manage the Pod content using these links.
How to create a Pod
I define the need for a Pod when a website has a particular section of pages (or even a single page) that requires a specific set of fields having to do with the subject at hand. As an example, we’ll go ahead and create a Team Pod that will house the various details about company team members. The First step is to Add the Pod by clicking Pods up top, and then Add new Pod:
Note: When creating a Pod, the name must be lowercase, no special characters or spaces.
After you’ve created your Pod, your instantly brought to the Pod manager. Here is where you’ll define what fields your Pod has, as well as a few settings regarding the Pod itself:
By default, Pods will add a name field (which is permanently required) as well as a
desc (description) field. The available fields in Pods are as follows:
- Required to be a date
- Validated as a number
- Renders as a checkbox to the user
- Single Line Text
- Generic single line text box
- Paragraph Text
- Multiline text box with HTML formatting
- Multiline code field
- File Upload
- Ties in directly with the WordPress Media library, also allows you to upload new media directly
- Permalink (slug)
- Automatic slug generation for each Pod entry
- Relationship (pick)
- Allows the Pod entry to be linked to another Pod or a WordPress object (Page, Post, User)
With this being a basics-only tutorial, the last bit which will be useful when first working with Pods is the Attributes section of the field. Using the available check boxes, you can make a field required (can’t be empty) or unique (can’t duplicate the data entered in another entry).
Adding fields to your Pod
You can add as many columns (fields) to your Pod as you’d like. For our example purpose, we’ll add the following columns (name already present by default):
- Job Title: single line text
- Photo: file upload
- Bio: paragraph text
- Employee of the Month: boolean
- Permalink (optional): permalink (slug)
When adding columns, do yourself a favor and make the name both easy to type as well as easy to remember. No spaces, all lowercase, no special characters. Pods provides a Label field for us to better describe the column to our user:
Note: You’ll notice that we’re using a Permalink column in this Pod. Permalinks work in the same way as in WordPress itself. I’ve purposely labeled this column as optional primarily because the word itself confuses clients. Additionally, Pods will automatically generate a slug when the Pod is submitted if nothing is filled out. No harm, no foul.
When all of our columns are added, we can reorder our fields by dragging the arrow icon and clicking Save settings, we can edit a single column by clicking the pencil icon, and we can remove a field by clicking the appropriate red X. We’ll go ahead and remove the
body field if you haven’t already, and be left with the fields we’d like to work with:
Note: Pods uses AJAX a lot. When reordering columns, you’ll need to hit Save settings in order for that change to be applied. Additionally, when creating new Pods, entries in the sidebar will not appear until you’ve refreshed the page. It’s sometimes a recurring theme, but the AJAX is helpful as it allows you to rapidly build your Pod without having to wait for page refreshes every time. I imagine this will be improved upon where possible in further releases.
Managing the content stored in your Pods
Setting up your Pod is only one-third of the process. After getting your columns in order, you need to populate some data to work with. This also gives you great insight regarding what your client will see when they manage their data. If you hit the Pods link in the sidebar to force a page refresh, you’ll notice a new entry at the bottom:
Clicking this new entry will allow us to manage the content within our new Pod.
Clicking Save changes will save all the data to our Pod for reference in our theme. If you hit the Browse button at the top of the edit screen, you’re shown a listing of all
Isn’t that much better than creating a generic WordPress page? You can order your Pods entries by the available columns, and limit the listing by narrowing the search as you can when browsing other WordPress data tables in the admin.
Integrating your Pods a bit more
Pods allows you to make managing this content that much more straightforward. If you edit the
team Pod we just created by clicking Pods (in the sidebar), then the Pods tab up top, and choose team from the dropdown, our
team fields will be loaded and we can maintain the various attributes of this Pod. What we’re going to do is mark this Pod as a Top Level Menu. What that means is that our Pod will now show up as its own entry in the WordPress admin sidebar, as opposed to being a subentry under the Pods heading. To make this change, simply check off that this pod is indeed a Top Level Menu, and give it a Menu Label:
Once you’ve filled out the label, you can go ahead and click Save settings. We’ll again hit the Pods entry in the sidebar on the left, and you’ll notice that we now have a dedicated entry for our Teams Pod. Awesome!
Implementing your Pod on this level will help your user to better make sense of how to manage the content of this custom data set.
Limiting access to Pods
One of my favorite features about Pods is that it gives you fine grained control when determining who will be able to manage what when it comes to your Pods content. Using the Roles panel, you can give user accounts access to certain Pods and remove access from others. The feature comes in really handy when taking advantage of the various user Roles WordPress provides. You can manage this access by clicking Pods on the left in the sidebar, and then hitting the Roles tab up top:
Now that we’ve set up our Pod and added a bit of data to it, the next article in this Pods CMS Series will guide you through pulling the data for use in your theme.
The Pods CMS Series on MBN
This article is the second in a series for Monday By Noon dedicated to Pods CMS.