What are Custom Fields?

Custom Fields are metaboxes that are used to input metadata that is related to your post. When you add a new post in WordPress, you’ll see these draggable boxes which are used for to store information about your post. Examples are author and excerpt. Another is custom fields. If you can’t see custom fields, click on the Screen Options tab and check the Custom Fields box.

WordPress Custom Fields MetaBox

cf1

Here you can add pieces of information to your Post which is then output by your theme. The WordPress Codex provides a useful example of Custom Fields that you might want to add to your Posts:

  • Mood: Happy
  • Currently Reading: Cinderella
  • Listening To: Rock Around the Clock
  • Weather: Hot and humid

While a Custom Taxonomy is way to organise and classify your posts into groups, Custom Fields let you store unique information that applies to your Post, Page, or Custom Post Type.

Uses for Custom Fields

There are lots of plugins and themes around that use Custom Fields for you to add specific information to your Posts, Pages, and Custom Post Types. Examples of this are:

  • Price, weight, and dimensions in your eCommerce store
  • Client name and company for your testimonials
  • Number of rooms, bathrooms, and floor size to your real estate listings
  • Ratings to your gaming reviews
  • Dates, time, and ticket price for your events

Creating Custom Fields

As with Custom Post Types and Custom Taxonomies, you can code your Custom Fields yourself. With a plugin such as Pods, however, you can create Custom Fields through the WordPress interface. Whenever you create a Custom Post Type you can add Custom Fields to that Post Type. In the example below, the number of pages is being added to the Books Custom Post Type.

custom_fields_table

This is then added to the post editing screen for your Books Custom Post Type. The information stored is specific to the post that is being added and can be used for querying and displaying data.

custom_fields_front

Special Note on Custom Fields for Taxonomies and User Objects

It’s worth noting that Pods also allows you to add Term Meta to your Taxonomies and User Meta to your User Accounts so you can have specific information applied to each taxonomy term or additional fields added to the User Account. WordPress supports Term Meta and User Meta natively, so you no longer need to use a separate table to store these fields (in the past these required Table Storage). Just add them like you would any other custom fields and call them with either get_term_meta or get_user_meta.

Other Helpful Documentation on Learning About Pods

Planning Your Custom Content Types

If you’re regularly building different types of websites, you may reach a point when the default WordPress Content Types are no longer sufficient for your projects. That’s when you need to get started using Custom Content Types on your website. Pods gives you the functionality to build Content Types, but you need to put thought and …

Read more

Planning Your Solution with Pods

What do you mean by Solution as opposed to my Data Structure? Before you dig too deeply into what kind of structure you might need, you need to think about what Content you’re going to be managing on your Web Application and how that content is going to be used by your Users and your …

Read more

What are Advanced Content Types?

ContentsBackgroundEnter Advanced Content TypesWhen to Use Advanced Content Types Background In order to understand Advanced Content Types, it helps to understand a little bit about how WordPress works. WordPress comprises PHP andMySQL. MySQL is the database that stores all of your website’s information, and PHP is the code allows for interaction between the web browser …

Read more

What are Custom Post Types?

Learn about Custom Post Types in WordPress and how Pods makes them easier to work with.

What are Custom Taxonomies?

Taxonomies are used to Group and Filter content across multiple content types.

What are Extended Post Types?

Extending another Object with Pods gives you access to add fields to WordPress Objects (Users, Media, Posts & Pages) or Post Types or Taxonomies created by other plugins.

What is a Custom Settings Page?

What is Pods?

ContentsWordPress Content Types and FieldsHow Pods Helps YouHow it Works WordPress Content Types and Fields WordPress is all about creating content. It comes bundled with Posts and Pages, which you can organise using the Categories and Tags taxonomies. It’s also got post meta fields which you can use to append data to your content – …

Read more