Open/Close Navigation

20+ Tutorials and Resources for Working with Custom Fields in WordPress

One of the keys to WordPress’s flexibility and endless possibilities is the use of custom fields. With custom fields you can do all kinds of things, but most designers and developers who are new to WordPress are not familiar with how to put custom fields into practice. In this post we’ll look at a number of tutorials that will show you some potential uses of custom fields, as well as a handful of plugins that make it easier or more productive to use custom fields.

Using WordPress Custom Fields: Introduction

This article from Justin Tadlock gives an overview of custom fields, and it’s actually the introductory post to a series on the subject of custom fields (other posts in the series are included in the list). If you’re not familiar with custom fields or if you just want to make sure you get the basics before moving further, this article is a great starting point.

Using WordPress Custom Fields

Using Custom Fields

The WordPress Codex of course provides some documentation on the subject of custom fields. Although many of the articles that are featured here will get into more specifics, it’s always a good idea to remeber that the codex is available when you have questions, or keep useful articles on the Codex like this one bookmarked.

Using Custom Fields

WordPress Custom Field Tutorial

Jin Yang explains custom fields and shows how you can use them to customize a blog post by styling the background. In the example he chooses a custom background image for the post, which is a pretty cool trick for making your blog unique.

WordPress Custom Field Tutorial

Using WordPress Custom Fields: Part 1 – The Basics

Perishable Press has a two=part series on custom fields. The first part includes some basic information and shows a few ways that custom fields can be used, including adding images to the sidebar.

Using Custom Fields Part 1

WordPress Custom Fields: Part 2 – Tips and Tricks

The second part of the Perishable Press series goes into more detail on working with custom fields. The article covers topics like conditional display of custom field data, and showing data only if a custom field exists.

Using Custom Fields Part 2

WordPress Custom Fields: Adding Images to Posts

One of the more common uses for custom fields is to add images to a post. This article is part of Justin Tadlock’s series and he provides all the instruction and code that you will need to get a custom field to show an image on your posts.

Adding Images to Posts

Add Thumbnails to WordPress with Custom Fields

Tutorial9 also provides a similar tutorial for giving the basics of custom fields and using them to show thumbnails on the front page or on the post page.

Add Thumbnails with Custom Fields

WordPress Custom Fields: Laying Text Over Your Lead Graphic

Derek Punsalan shows a really nice approach to use a custom field for adding a background image behind the post title. This is another way to take advantage of the power of custom fields to create a blog that looks a little more unique.

Laying Text Over Your Lead Graphic

How to Easily Get the Value of a Custom Field

This is a brif post from WPRecipes that explains how you can the value of a custom field, with the necessary code provided.

How to Easily Get the Value of a Custom Field

An Easy Way to Get the Contents of a Custom Field

In this article Nathan Rice shows a way to get the contents of a custom field by using less code. His approach involves editing the functions.php file, which he explains.

An Easy Way to Get the Contents of a Custom Field

How to Display Multiple Values of a Custom Field Key

This article shows how you can use custom fields in situations where a post may have zero, one or multiple values of the same custom code. The example used in the tutorial is quotes. Some post may have none, while others may have several.

How to Display Values of a Custom Field Key

Display Inline Ads with Custom Fields and WordPress

This post shows how you can use custom fields to add AdSense or other ads to specific posts. While there are plugins for this purpose, knowing how to do it manually is never a bad thing.

Display Inline Ads

How to Add Videos to Your WordPress Sidebar

This is another post in Justin Tadlock’s series. In this article he shows how you can add YouTube videos to your sidebar, controlled by custom fields. This is an interesting idea that you don’t see in action very often, but could have a lot of potential in the right situation.

How to Add Videos to Your WordPress Sidebar

WordPress Custom Fields: Listing a Series of Posts

If you often write posts in a series, Justin Tadlock shows how you can list other posts from the series by using custom fields. The end result would be similar to a related posts plugin, except you would have more control over which posts are listed.

Listing a Series of Posts

In Praise of WordPress Template Tags: Part 2

Darren Hoyt has a two-part series about template tags and magazine-style themes. In the second part he covers a number of items, including custom fields as they relate to the magazine-style layout.

In Praise of WordPress Template Tags

WordPress Tip: 3 Awesome Custom Field Tricks

Chris Cagle’s article covers three things you can do with custom fields: 1) a custom “read more”, 2) awesome thumbnailed recent posts, and 3) post-specific CSS overrides.

3 Awesome Custom Field Tricks

Jazz Up Your Site: 28 Ways to Use Custom Fields

Raj Dash’s article on Performancing can be helpful for seeing the potential of custom fields. You may see a few ideas on here that you hadn’t thought of before that would be useful on your site or for a client project.

28 Ways to Use Custom Fields

Creating Custom Write Panels in WordPress

While custom fields have plenty of power and potential, they’re not always the most user-friendly for clients. Function has provided this tutorial for creating custom write panels that will allow you to accomplish the same things as custom fields, but may be a little more manageable for some people, especially non-tech-savvy clients.

Creating Write Panels in WordPress

Plugins for Working with Custom Fields:

In addition to the tutorials featured above, there are a number of plugins that enhance the use of custom fields in some way, or make them easier to use. Here is a small sampling of useful plugins that are compatible with the latest version of WordPress, 2.7.1.

Custom Field Template

This plugin adds the default custom fields on the Write Post/Page, making it a little bit easier to work with.

Custom Fields Shortcode

You can use this plugin to show custom fields in your posts by using shortcode, with no modification required for your theme.

Custom Field Images

With this plugin you can easily add images to your posts, pages and feeds. There is also functionality to display recent posts as images instead of text links.

Custom Field Taxonomies

Custom Field Taxonomies will allow you to enhance the capabilities of your site by making some of your custom fields act like tags.

Advanced Custom Field Widget

This plugin will allow you to easily show custom field data in the sidebar of specific posts, providing essentially limitless possibilities.

Custom Field List Widget

This plugin lists all values of a choosable custom field name, groups the values of of a post and (hyper-) links the values to their posts as a sidebar widget.

WP Custom Fields Search

This plugin helps to improve the functionality of the WordPress search by allowing multiple form inputs to search different aspects of a post. An example use (and the reason the plugin was created) is for searching a real estate website by factors such as price.

More Fields

More Fields is a WordPress plugin that adds boxes to the Write/Edit page. These boxes contains input fields, so that additional (more) fields can be added to a post.

For more WordPress-related content, please see:

Looking for hosting? WPEngine offers secure managed WordPress hosting. You’ll get expert WordPress support, automatic backups, and caching for fast page loads.

Join the Newsletter

Subscribe to our weekly newsletter chalked full of useful tips, techniques, and design goodies.

Popular WordPress Themes

More Design Inspiration