20+ Tutorials and Resources for Working with Custom Fields in WordPress
Published May 13th, 2009 in WordPressOne 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
This plugin adds the default custom fields on the Write Post/Page, making it a little bit easier to work with.
You can use this plugin to show custom fields in your posts by using shortcode, with no modification required for your theme.
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 will allow you to enhance the capabilities of your site by making some of your custom fields act like tags.
This plugin will allow you to easily show custom field data in the sidebar of specific posts, providing essentially limitless possibilities.
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.
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 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:




















41 Responses to “20+ Tutorials and Resources for Working with Custom Fields in WordPress”
Your list of plugins for working with custom fields missed the greatest option – More Fields [http://wordpress.org/extend/plugins/more-fields/]. It offers dead-simple creation of named fields and types (radio buttons, drop-down list, input, etc) so that users don’t have to remember a custom field name / format that is required to make the theme development possible. If you are tired of searching through the custom field drop-down list every time you add a post that has the same X fields, you really should consider this plugin.
It also gives you the possibility to create custom write panels where you specify what custom fields are on display in the post / page panel and a separate admin menu section for those content elements. I would say that it enables the more advanced user aspects of “Wordpress-as-a-CMS” without the complexity of Flutter, PODS or other large scale plugins.
When combined with my Idealien Category Enhancements [http://wordpress.org/extend/plugins/idealien-category-enhancements/] you have a very easy way to create custom content entry and custom templates to match.
Hi Jamie,
Thanks for the suggestion. I just added it to the post.
very helpful tutorials, thank you so much..
Great Tips, I will for sure come back and try some out.
Thanks,
Anthony Proulx
I absolutely love working with custom fields in WP, thanks for posting this!
Thank you for featuring my tutorial Steven. Another good tool, although not advertised as a CF plugin, is Art Direction.
http://jcksn.com/2008/12/16/wordpress-art-direction-plugin/
It uses custom fields to give each wordpress post a unqiue style. I think it’s easier to implement than my method
Great list, custom fields make almost anything possible in WP
Thanks for including my two-part series on custom fields! This is an incredible resource that was definitely needed. Thanks for creating it!
No problem Jin, I liked your post. Thanks for that plugin, I’ll check it out.
You’re welcome Jeff. Thanks for the good content.
Great collection of custom fields tutorials. I haven’t seen a lot of these, and although I know how to use custom fields already, there are some great ideas that I haven’t though of before here.
And of course, thanks for mentioning my inline ads tutorial as well.
Brilliant stuff, Steven ! Looking forward to more such posts which would help in customizing the WP framework easily. I’d love to read them ( and you know why
)
Now this is totally strange. There’s a post on the same topic on Smashing Magazine published little under 3 hours before this one… Perhaps you should add it to the list.
Interesting stuff, I’m familiar with custom fields but this is a really good point of reference that is well worthy of a bookmark
Bogdan,
Yeah I saw that post. When I put this post together I thought it was a good idea because I hadn’t seen much recently on custom fields. I guess Smashing had the same thought!
Wordpress is ROCK.
i was read slide show from Nick La and i found the various way to use wordpress. in this post i found other various way too, i will use for my reference for my article about Wordpress. thanks for share
Hey thanks for the post. These are great tips to use for WordPress. I love using the custom fields.
This is a great set of tutorials for Wordpress custom fields hacks. Thanks. This will come in handy on my Wordpress site.
Awesome list, thanks for the great resource. I’ve been working on an idea that involves custom fields that, being a little out of left field, may or may not work! But if it does, I’ll be sure to share it with everyone!
Nice post.
I just wanted to share my WordPress Mass Custom Fields Manager Plugin, with anyone who needs to update/add or delete lost of custom fields at once.
Have fun and if you use it please contact me for feedback/comments/requests.
whooo man, great post.
thank you for sharing… i will use your tips for my blogs
great collections.i really loved it….
Very good post, I will include it on my weekly post!
This was tweeted to me and I find it very useful I will bookmark this for sure and use it as reference. I wanted to know how to add video to the side bar and now I know. Thanks for sharing.
Good tips, which I should try on one of my Wordpress blogs.
Trackbacks