stand for ukrainian independence image
Stand for Ukrainian Independence. Contribute.
stand for ukrainian independence image
Help Center
What Are WordPress Custom Fields? Everything You Need to Know
bulat
Alexander Bulat
WordPress Copywriter
Show all articles
Updated on
Useful Resources

What Are WordPress Custom Fields? Everything You Need to Know

What are WordPress custom fields? How do they work, and why would you use them? In this helpful, informative article, I will dive into this and explain everything you need to know about using custom fields in WordPress.

Table of Contents

What are WordPress Custom Fields, and How Do They Work?

WordPress Custom Fields is a feature that allows you to add additional metadata to your posts, pages, or custom post types via meta boxes. Metadata refers to information that describes or gives context to your content. While WordPress provides some default metadata (like the title, content, and author), custom fields let you go beyond these basics, opening the door to an entirely new level of content personalization and dynamic site functionality.

At their core, custom fields serve as key-value pairs. The “key” is the name of the metadata field, and the “value” is the specific data you want to store for that key:

  • key—Bunny, value—Bugs;
  • key—Mouse, value—Mickey;
  • key—Book Award, value—1997 Pacific Northwest Booksellers Association Award, 1997 Oregon Book Award for Best Novel.

This flexibility allows you to attach virtually any type of data to a post or page.

Advantages and Use Cases

One of the most well-known examples of custom fields in action is WooCommerce. If you have an online shop selling various products, there are certain key pieces of information you need to display with the products.

For example, product category, price, color, and rating. It can then be helpful for the customers to be able to create filters and sort the products by these attributes, for example, showing the cheapest or highest-rated products at the top of the page. 

Here are some examples. 

Viaja y Estudia

viajayestudia website homepage

On the Viaja y Estudia website, we can see that the duration of the tour is 8 days, and the price is €950. Since this information needs to be displayed for all travel packages, it will be set as a custom field.

Forbidden Root

forbidden root website homepage

On the Forbidden Root, custom fields are used to display details such as location, event date range, time, and price. In this example, the event “Pub Bingo” is highlighted, showing that it takes place in Columbus, is free of charge, and includes specific time slots and dates.

Botpedia

botpedia listing page

The Botpedia website listing pages include various custom fields to provide detailed information about the proxy service. These fields include Proxy Types, Supported Regions, Additional Services, and so on. This layout ensures users can easily access specific details about the listed proxy service.

“No-Plugin Way” to Add WordPress Custom Fields

On the editing screen for a post or page, scroll down to the custom fields meta box.

Enter the name of the custom field you want to add, input its value, and click the Add Custom Field” button. Once you are happy with your custom field(s), you can save your post or page, which will store the custom field settings. 

How do you enable custom fields in the Block Editor?

By default, the Custom Fields panel might be hidden in the Block Editor. You can enable it via the editor settings. This ensures that you can create, edit, and manage custom fields directly in the editor interface without requiring additional tools or plugins.

  • In the post editor, click three dots in the top right corner, and at the bottom, click on Preferences;
  • In the Preferences window, scroll to the bottom, and in the Advanced section, enable the Custom fields switcher.
enabling custom fields

Reload the editor if needed.

How do you display custom fields?

Before you can see the custom field on your website, you need to update your WordPress theme with the custom fields. One way to do this is to edit the theme code, but you should only do that if you are familiar with editing WordPress themes. If not, some custom field plugins have been reviewed below.

But if you want to edit the theme code, this is how you do it.

So, you will need to edit the correct theme file to match the custom field you want to display. For example, if you’re going to display it on individual posts and pages, edit the file named single.php or content-single.php.

To enter the custom fields code inside the WordPress loop, find a line of code like this:

<?php while ( have_posts() ) : the_post(); ?>

Then add the code before this line:

<?php endwhile; // end of the loop. ?>

The code to add will be like this:

<?php echo get_post_meta($post->ID, 'key', true); ?>

You need to replace “key” with whatever the name of your custom field is. So, in the book award example we used earlier, it would look like this:

<p>Awards received: <?php echo get_post_meta($post->ID, Book Award, true); ?></p>
custom field backend

Save the changes, then view the post or page where you added the custom field, and you should be able to see it displayed as “Awards received:1997 Pacific Northwest Booksellers Association Award, 1997 Oregon Book Award for Best Novel”.

custom field preview

Once you’ve done that, you can use that same custom field in any other post or page on your website. All you need to do is go to the custom meta fields meta box, choose the custom field from the dropdown menu, and input the value.

Then, all you need to do is click the “Add Custom Field” button again like before, save your post or page, and you’re done.

What if you can’t see the custom field in the post edit screen?

WordPress’s default upper limit is set to 30 custom fields in this form, which can create a problem if you have a theme or plugin already using custom fields. In that case, there may already be too many custom fields, and you might not see your new custom fields in the dropdown list.

For those of you comfortable with using code, there is some code you can add to your functions.php file:

add_filter( 'postmeta_form_limit', 'meta_limit_increase' );
function meta_limit_increase( $limit ) {
    return 50;
}

This will increase the limit to 50, but if you still can’t see your new custom fields, you can change it to a higher number.

With the above method, there’s always the chance you could make a mistake with the code. But even if you are familiar with adding code to WordPress, wouldn’t it be better if there was an easier way of managing custom fields?

Thankfully, we already have a complete guide on how you can manage custom fields in WordPress using the JetEngine plugin.

Top 3 WordPress Custom Fields Plugins

There are various plugins available that make the process of adding and managing custom fields in WordPress easier. The top three are Secure Custom Fields, JetEngine, and Pods. Here, I will give you an overview of all three of them so you can decide which plugin is right for you.

Secure Custom Fields

🔧 Best for developers who need precise control over custom fields and metadata.

secure custom fields plugin homepage

Secure Custom Fields is a versatile plugin that allows users to add and manage custom fields for posts, pages, and custom post types. It features over 30 field types, conditional logic, and field groups to streamline data organization. SCF is developer-friendly, providing robust tools to extend and customize WordPress functionality with minimal effort.

Key features:

  • over 30 custom field types (e.g., text, image, repeater, relationship);
  • conditional logic to control field visibility;
  • field groups for better organization;
  • Gutenberg block creation support;
  • flexible content fields for dynamic layouts;
  • REST API integration for external data management.

Pricing: a free version is available; the Pro version starts at $49/year.

Pros:

  • extensive field types and conditional logic;
  • intuitive interface for creating field groups.

Cons:

  • Pro features require a paid license.

JetEngine plugin

🛠️ Best for users building dynamic websites with Elementor or Gutenberg.

jetengine plugin homepage

JetEngine by Crocoblock is a dynamic plugin for creating custom post types, taxonomies, and custom fields. It integrates seamlessly with Elementor, Block Editor, and Bricks, enabling users to build advanced websites with dynamic content. JetEngine offers listing grids, data filtering, and custom query options, making it a complete solution for database-driven WordPress sites.

Key features:

Pricing: the annual subscription starts at $43/year, and the Lifetime plan starts at $750.

Pros:

  • seamless integration with Elementor, Bricks, and Gutenberg;
  • comprehensive tools for dynamic content and listings.

Cons:

  • it may overwhelm beginners with its extensive features.

Pods Plugin

🔧 Best for beginners seeking an easy-to-use tool for custom content types and fields.

pods plugin homepage

Pods is a free and lightweight plugin for creating and managing custom post types, taxonomies, and custom fields. It features an intuitive interface that simplifies complex tasks, allowing users to extend WordPress without touching code. The Pods plugin also supports relationships between content types, making it ideal for organizing structured data.

Key features:

  • creation of custom post types, taxonomies, and fields;
  • relationship management between custom content types;
  • simple interface for managing and extending WordPress content;
  • supports custom templates with Pods templates editor;
  • compatibility with popular plugins like Elementor and Beaver Builder;
  • free and open-source with robust community support.

Pricing: free to use; donations accepted for additional support.

Pros:

  • simple, no coding interface;
  • supports advanced relationships between data types.

Cons:

  • limited features compared to premium plugins;
  • fewer integrations with third-party tools.

FAQ

What are WordPress custom fields used for?

WordPress custom fields are used to add extra metadata to posts, pages, or custom post types. This metadata can include information like product prices, event dates, ratings, or any other custom data needed for your website. They allow you to create highly personalized and dynamic content for your site.

Do I need to know coding to use WordPress custom fields?

No, you don’t necessarily need to know coding to use WordPress custom fields. While adding custom fields manually may require some coding, plugins like Secure Custom Fields, JetEngine, and Pods make it easy to create and manage custom fields without writing a single line of code.

Why can’t I see the custom fields option in the Block Editor?

By default, the custom fields panel is hidden in the Block Editor. To enable it, open the editor settings by clicking the three dots in the top right corner, select “Preferences,” and turn on the custom fields option under the Advanced section. If the option still doesn’t appear, you may need to reload the editor.

Conclusion

So, there you go. I hope you found this guide to WordPress custom fields helpful and informative. First, I looked at what custom fields are and how they can be used. I then showed you how to add custom fields and manage them using code manually. Finally, I gave an overview of some of the top custom field plugins available.

Have you been using custom fields on your WordPress website? Do you manage them using code, or do you have a favorite plugin? Please let us know in the Crocoblock Community.