In WordPress, custom fields are used to add additional information related to a post or page.
They are commonly used by WordPress plugins and themes to store important data. You can also use custom fields yourself to store your own data and then use it on your website.
Custom fields are an advanced WordPress concept, and you will often find them mentioned in WordPress tutorials around the web. You’ll find lots of helpful tips in our post, WordPress Custom Fields 101: Tips, Tricks, and Hacks.
What Is Metadata?
When you write a new post, page, or other type of content, WordPress saves it into two different areas. The first part is the actual content of the post that you add using the post editor.
The second part is information about the post. That includes the title, author, and the date and time it was published. This information is called metadata.
Custom fields are a type of metadata that allows you to add custom data to your posts and pages. The information isn’t contained in the post but provides information about the post.
Where Do You Find Custom Fields?
If you recently started your WordPress blog, then you will likely not see the custom fields option on your site. Since it is an advanced feature, the WordPress core development team decided to hide custom fields by default.
They also made it easy for anyone to make them visible with just two clicks from within the post edit screen. To learn how to do this, refer to our guide on how to fix custom fields not showing in WordPress.
Adding Custom Fields to a Post or Page in WordPress
To add custom fields, you need to edit the post or page where you want to add the custom field and go to the custom fields meta box.
Then you need to provide a name for your custom field and then enter its value. Click on the Add Custom Field button to save it.
The field will be stored and displayed in the custom fields meta box like this:
You can edit this custom field any time you want and then click on the update button to save your changes. You can also delete it as needed.
Your custom fields are saved when you save your post or page.
What Can Custom Fields Be Used For?
Custom fields can be used to store simple information about a post. Then developers can use them when they add new features to WordPress.
You could use them to record the mood you were in while writing the post or the music you were listening to at the time. You can use them to rate products you are reviewing or anything else you can think of.
Theme designers and developers use custom fields to add new features to WordPress. They sometimes even create a beginner friendly interface for adding the custom data.
Themes and plugins use custom fields to store additional post-related information in all sorts of ways. For example, they may store SEO metadata about the post, or store additional information in user profiles.
Another example of how custom fields can be used is to let users add additional information about themselves when they comment on a post. We show you how to do this in our guide on how to add custom fields to comments form in WordPress.
We hope this article helped you learn more about custom fields in WordPress. You may also want to see our Additional Reading list below for related articles on useful WordPress tips, tricks, and ideas.
- How to Add Custom Fields Automatically on Post Publish in WordPress
- How to Add Additional User Profile Fields in WordPress Registration
- How to Add Custom Fields to Comments Form in WordPress
- WordPress Custom Fields 101: Tips, Tricks, and Hacks
- How to Add Custom Meta Boxes in WordPress Posts and Post Types
- How to Fix Custom Fields Not Showing in WordPress (Easy Guide)