Custom Fields WordPress Guide: How to Create and Use Them Easily

WordPress gives you an easy way to publish posts and pages, but sometimes the default editor is not enough. You may want to add extra details such as a project date, product price, or client name. That is where custom fields come in.

Custom fields help you store and display extra information beyond the standard title and content. They make your site more structured, professional, and easy to manage.

In this Custom Fields WordPress Guide, we will explain what custom fields are, how to create them using the built in options or the Advanced Custom Fields plugin, and how to use them to make your site more dynamic.


What Are Custom Fields in WordPress

Custom fields are small pieces of data that add more information to your posts, pages, or custom post types.

Each field has a name (the key) and a value (the information you enter).

For example, a blog about travel might use custom fields like:

  • Destination Name
  • Travel Date
  • Cost
  • Duration

These values are stored with your post and can be displayed anywhere on your website.


Why Custom Fields Are Useful

Custom fields make your content more flexible and easier to control.

Here is why they matter:

  1. Better content organization
    You can separate structured data from the main post content.
  2. Consistency
    Using the same fields across posts keeps your layout clean and professional.
  3. Faster editing
    You can update specific information without editing your entire post.
  4. Dynamic content display
    Developers can use fields to show unique information on different pages automatically.

Custom fields are used by developers, designers, and business owners to build anything from portfolios to real estate listings.


How to Enable Custom Fields in WordPress

By default, the custom fields option is hidden in the block editor. You can enable it in a few simple steps.

Step 1: Open a Post or Page

Go to your WordPress dashboard and open any post or page.

Step 2: Enable the Custom Fields Panel

  1. Click the three dots in the top right corner of the editor.
  2. Select Preferences, then Panels.
  3. Turn on Custom Fields (legacy).

Step 3: Add a New Field

  1. Scroll to the bottom of your post.
  2. Click Enter New to create your field.
  3. Add a Field Name like “subtitle” or “project_date.”
  4. Add a Field Value such as “Summer Travel Guide 2025.”
  5. Click Add Custom Field, then Update the post.

Step 4: Display the Field on Your Site

Open your theme file (for example, single.php) and paste this line where you want the value to appear:

<?php echo get_post_meta(get_the_ID(), 'subtitle', true); ?>

Replace subtitle with your field name. Save the file and refresh your post to see the result.


How to Use the Advanced Custom Fields Plugin

The built in feature is helpful for basic needs, but the Advanced Custom Fields (ACF) plugin makes the process much easier and more powerful.

Step 1: Install and Activate ACF

  1. Go to Plugins → Add New.
  2. Search for Advanced Custom Fields.
  3. Click Install Now, then Activate.

Step 2: Create a Field Group

  1. Go to Custom Fields → Add New.
  2. Give your group a name such as “Project Details.”
  3. Click Add Field and choose a field type.
    Common types include Text, Image, URL, and Date Picker.

Step 3: Set Location Rules

Choose where your fields will appear. For example, select Post Type is equal to Page or Portfolio.

Step 4: Add Data and Display It

When you edit a post, you will see your custom fields ready to use. Enter the information, then use this code in your theme to display it:

<?php the_field('field_name'); ?>

Replace field_name with your chosen name.

Example:

<p>Client: <?php the_field('client_name'); ?></p>
<p>Date: <?php the_field('project_date'); ?></p>

Common Custom Field Types

Field TypeExample Use
TextTitle, short label, or name
TextareaLong description or notes
NumberPrices, ratings, or quantities
ImageLogos, product photos, or icons
URLLinks to external sites
Date PickerProject or event dates
SelectDropdown options

These field types can be combined to build flexible and detailed layouts.


Tips for Managing Custom Fields

  • Use clear and short names without spaces or special characters.
  • Group related fields together for better organization.
  • Avoid adding unnecessary fields to keep your dashboard simple.
  • Test your fields on a staging site before going live.
  • Always back up your site before editing theme files.

Following these habits keeps your WordPress site clean, efficient, and easy to maintain.


When to Use Custom Fields

You should use custom fields when you need to add structured and repeatable data to multiple posts or pages.

Examples include:

  • Portfolios: Client name, date, project link
  • Real Estate Sites: Property price, size, location
  • Blogs: Reading time, author info, source link
  • Ecommerce Stores: Product code, warranty, availability

They help you maintain consistency and make updating content faster.


Conclusion

Custom fields are one of the most powerful features in WordPress. They help you organize data, create dynamic layouts, and design websites that are easy to manage and scale.

With this Custom Fields WordPress Guide, you now know how to create custom fields using both the default WordPress method and the Advanced Custom Fields plugin.

Start by creating a few simple fields, test how they appear, and then expand your setup as your website grows. Once you master custom fields, managing content in WordPress becomes faster, smarter, and much more professional.

Scroll to Top