Adding Custom Fields

WordPress is about to turn 15 years old. What started out as a simple blogging platform has turned into a full blown CMS. No CMS would be complete without custom fields for specific data. As a quick example you may want to have a grouping of data about books. Every book has a title, an author, a publishing date, a genre, and so on. We’re going to look at a couple quick ways to handle managing that data from within WordPress.

WordPress Custom Fields

The first method will use standard posts, categories, and WordPress custom fields.

Step 1 – Create a category

You will need to go under Posts > Categories, and create a Books Category.

Step 2 – Screen Options

Start creating a new post and you will not see a place for Custom Fields more than likely. If they have not been disabled you can scroll to the top of the page and click on the Screen Options tab. From the screen options panel, you can turn on Custom Fields.

Once you have checked Custom Fields, below the main WYSIWYG editor you should now see this.

Step 3 – Adding Content

Once you have turned on the Custom Fields, you can begin adding your content. Start by either selecting an existing field created on a previous post, or by clicking enter new and creating a new field. Once you have your field name in place, you can then add content to the value field.

Once you have your content in place you can hit publish on your post!

Step 4 – Displaying The Custom Content

Some themes will automatically display this content in a very generically formatted way. If your custom fields are not showing up, you will need to either contact your developer, or get your hands dirty with a little php.

Up Next

In the posts following this one, I’m going to cover a couple of things. While useful, the default WordPress custom fields aren’t exactly user friendly, I’m going to show you how to set up custom fields that flow more like a typical form. Following that I’ll be looking at how to output the content of the fields in a theme.

Leave a Reply