WordPress custom fields not showing

New Page

How to Fix Custom Fields Not Showing in WordPress

Last updated on February 10, 2021 by the editorial team | Reader Disclosure Disclosure : Our content is reader approved. This means that if you click on some of our links, we may earn a commission. Find out how WPBeginner is funded, why it matters, and how you can support us.

Share 57 Share Tweeter Share Facebook Messenger WhatsApp E-mail

Can’t find the custom fields option on your WordPress site? Custom Field is an advanced WordPress feature that helps you add custom content to your WordPress posts and pages by following various WordPress tutorials. In this article, we will show you how to easily fix custom fields not showing issues in WordPress.

Fix missing custom fields in WordPress Fix missing custom fields in WordPress

Fixed custom fields not showing issues in WordPress

Custom fields are usually associated with posts, pages, or custom WordPress post types. You’ll often find custom fields mentioned in various WordPress tutorials around the web, but chances are you won’t see the custom fields option on your site, especially if you’ve recently launched your WordPress blog.

In the past, custom fields were visible by default on the post-edit screen of all WordPress sites. However, since this is an advanced feature, the core WordPress development team decided to hide custom fields by default for all new users in WordPress version 3.1.

They also allowed anyone to make them visible with just two clicks from the post edit screen.

Simply create or edit an existing post/page, then click the “Screen Options” button in the top right corner of the screen. This will show you a menu with various options that you can show or hide on your post edit screen.

Go ahead and check the box next to the “Custom Fields” option.

show custom fields Show Custom Fields

Note: If you don’t see the Custom Fields option on your site, scroll down to the troubleshooting option later in the article.

You can now scroll down the post edit screen and you will notice a new meta box called “Custom Fields” under your post editor.

Custom Fields area Custom Fields area

Since WordPress remembers your view choice, it will continue to show the custom fields area whenever you edit posts on your website.

You can use this area to add, edit, and delete custom fields and their values.

What are CustomFields? What can you do with them?

By default, when you write a new post, page, or any content type, WordPress saves it into two different areas. The first part is the body of your content that you add using the post editor.

The second part is the information about that particular content. For example, title, author name, date / time, and more. This bit of information about the post is called metadata.

Apart from the default post metadata, WordPress also allows you to save custom metadata by using custom fields.

To learn more, see our beginner’s guide to WordPress custom fields with examples, tips, and tricks that you can use on your website.

WordPress developers use custom fields to store custom post metadata for your posts. For example, the All in One SEO plugin uses custom fields to store SEO settings for your posts.

snippet-meta-description-aioseo snippet-meta-description-aioseo

However instead of using the default custom fields box shown above, these plugin developers create their own custom meta boxes. This makes it easier for users to input information.

If you want to create a custom meta box to easily input custom metadata, then see our guide on how to add custom meta boxes in WordPress.

Troubleshooting

Recently one of our readers came to us with a problem where the Custom Fields option was missing from the WordPress screen options. After some investigation, we were able to find the cause of the issue.

If your WordPress site is missing the custom fields option under the ‘Screen Options’ menu, then you need to check if you have the Advanced Custom Fields (ACF) plugin active on your site.

ACF is a very popular WordPress plugin that developers use to create custom meta boxes. ACF is running on over 1 million websites.

In ACF version 5.5.13, they added a setting to remove the default WordPress custom field metabox to speed up the load times on the post edit page. The idea being that you shouldn’t need the default metabox since you’re using ACF.

However if you need to have the default WordPress custom field metabox enabled, then you need to add the following code to your WordPress theme’s functions.php file.

1

add_filter( ‘acf/settings/remove_wp_meta_box’ , ‘__return_false’ );

This will solve the custom fields option missing issue in WordPress.

We hope this article helped you fix the custom fields not showing issue on your WordPress site. You may also want to see our ultimate list of most useful WordPress tips, tricks, and hacks.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Comparte 57 Cuota Pío Cuota Facebook Messenger WhatsApp Correo electrónico

WordPress Advanced

23 de agosto de 2022

Will M. y Nabilla R.

7 minutos de lectura

WordPress Custom Fields: What They Are and Ways to Add Them to Posts and Pages

Copiar link

¡Copiado!

Download Ultimate WordPress Cheat Sheet

As one of the most popular content management systems (CMS), WordPress is widely known for its various functions and customization options.

One such option is expanding metadata, which refers to key information of a page or post, including author names, titles, and descriptions.

Users can include additional metadata by enabling custom fields in WordPress, extending the functionality of specific posts or pages. For instance, collecting the author’s email, putting a disclaimer on a sponsored post, or attaching extra details to a product.

Similar to most WordPress features, you can add custom fields to your posts and pages manually or using a dedicated plugin.

In this article, we’ll explain what custom fields are and how to add them to your WordPress content using both methods.

  • ¿Qué son los campos personalizados de WordPress?
  • Cómo agregar campos personalizados de WordPress a sus publicaciones y páginas
    • Use el complemento de campos personalizados avanzados
    • Otros complementos de campos personalizados
    • Agregue campos de publicación personalizados de WordPress manualmente y edite su tema para mostrarlos

What Are WordPress Custom Fields

Each WordPress page and post you create carries its own metadata. The default metadata in WordPress includes the author’s name, date, and time. For example, on the post below, you can see the metadata displayed above the post title.

Cómo hacer la portada de un artículo de un sitio web en los tutoriales de Hostinger How to Make a Website article cover on Hostinger Tutorials

In some cases, however, you need to add metadata that WordPress doesn’t support out of the box – this is where custom fields come in handy. WordPress custom fields are a feature that inputs additional information to a post or a page.

Custom fields give you a way to enter that data and extend the information on your content:

  • Flexible and customizable. Custom fields are made of code snippets, allowing you to customize and control their placements on your site’s front-end.
  • Easier input and update. If you want to update the information displayed on your posts, simply modify the custom fields instead of editing each post individually.
  • Consistent. Custom fields ensure all of your posts display the same information in the same formatting.

Finally, it is important to note the difference between custom fields and custom post types.

A custom post type is a specially formatted kind of content, such as review posts or product pages. In many cases, people add custom fields to their custom posts, but you can also use them separately.

How to Add WordPress Custom Fields to Your Posts and Pages

In the following section, we’ll help you create your own custom fields using two different methods.

The first method involves installing a dedicated plugin to simplify the process. The second one requires that you manually edit your WordPress theme files.

Use the Advanced Custom Fields Plugin

There are a lot of plugins to help you quickly add WordPress custom fields. The most popular one is Advanced Custom Fields (ACF).

Banner de complemento de campos personalizados avanzados Advanced Custom Fields plugin banner

It comes with an easy-to-use user interface that allows you to add 30 custom field types with only a few clicks. To get started, you need to install the plugin and activate it.

Go to your dashboard and into the Plugins -> Add New tab. Once you’re there, use the search bar to look for Advanced Custom Fields.

Agregue la sección de complementos, resaltando el botón Instalar ahora junto al complemento ACF Add plugins section, highlighting the Install Now button next to the ACF plugin

Go ahead and click the Install Now button. Wait until the text changes to Activate, then click on it once more.

Once Advanced Custom Fields is up and running, you’ll see a new Custom Fields tab appear in your dashboard. Clicking on it will reveal a list of custom field groups, which should be empty.

Pestaña Campos personalizados en el panel de WordPress Custom Fields tab on the WordPress dashboard

To set up a field group, simply click on the Add New button at the top of the screen.

Continue by clicking on the Add Field button. Pick a label for your new field that will also serve as its name. You also need to choose what type of field you want to set up – some of the options include text, checkbox, and email.

Agregar nuevo grupo de campos Add new field group

For this example, we’re going to create an Email field to collect every author’s email address.

Crear un campo de correo electrónico Creating an email field

To write a set of instructions, simply fill in the provided field. For example, you can add “Please fill out your email address before publishing your post.”

Although this step isn’t necessary, it helps other administrators on the website know what to do with the custom field.

Instrucciones de campo Field instructions

Moving on, you’ll also need to indicate whether this is a required field or not. This way, it will not be possible to save posts or pages without filling it out.

Alterne el botón para marcar si el campo es obligatorio Toggle the button to mark whether the field is required

There are a few other advanced settings you can adjust if needed. Once the basic properties are filled out, scroll down to locate the Close Field button.

Botón cerrar campo Close field button

Clicking on it will automatically add your custom field group to the list. To add more custom fields, simply choose the Add Field button and repeat the process.

Lista de grupos de campos personalizados List of custom field groups

Once you have created your custom field groups, you’ll need to configure where these custom field groups will show up by customizing the Location settings.

There’s an option labeled Show this field group if that you can use to configure the display options.

In this example, we configured the custom field to show up on regular posts. If you want, you can add more than one location to display your custom field using the Add rule group button.

Agregar sección de grupo de reglas Add rule group section

Finally, hit the Publish button to save your new custom field.

When your field is ready to go, open the WordPress post editor. The custom field will show up right under the text editor.

Sección de campo personalizado en el editor de texto Custom field section under the text editor

Keep in mind that you can’t use Advanced Custom Fields to display custom fields for website visitors – the custom field will only show up in your dashboard.

If you want to display the custom fields on the site’s front-end, you’ll need to edit the theme file. We will walk you through this process later in the article.

Other Custom Field Plugins

If you’re looking for a plugin that offers more options than Advanced Custom Fields, we listed three alternatives to help you find a tool that better suits your website needs.

1. Meta Box

Banner del complemento Meta Box Meta Box plugin banner

With Meta Box, enable custom fields in WordPress posts, pages, and forms. It supports up to 40 custom fields, from text lists and check-boxes to images and user fields.

It provides free extensions, allowing you to add custom fields in the comments and Yoast SEO to improve your content’s SEO scores.

It also integrates with WordPress page builders like Elementor and Beaver Builder.

Additionally, Meta Box offers both free and premium versions.

With its premium version, starting at $99/year, you’ll get access to its meta box builder. This feature lets you add WordPress custom fields using an easy-to-use drag-and-drop interface.

[PRICING / DOWNLOAD]

2. Custom Fields Suite

Banner de complemento de Field Suite personalizado Custom Field Suite plugin banner

Custom Fields Suite offers a lightweight and straightforward solution to enable custom fields in WordPress websites.

This free plugin supports 14 field types, including loop, tab, WYSIWYG, date, and true/false. You can add custom fields to your WordPress post, page, and custom post types.

Use the plugin to create custom field groups and display them on the post editor. With the placement rules box, you can also decide where the field group will appear. For instance, it’s possible to place it above or below the text editor.

The only downside of Custom Fields Suite is that it doesn’t have a customer support team. However, it provides documentation that you can access for more information about the plugin.

[DOWNLOAD]

3. Pods

Banner de complemento de WordPress para pods Pods WordPress plugin banner

Pods manages all custom content in a simple and clean interface. This makes it easier to add custom fields to your posts, pages, or any custom content types.

Use the plugin’s shortcodes, widgets, or templates to display the fields anywhere on the site. Pods also comes with default custom field types, but it’s possible to create new types according to your needs.

Pods integrates well with other WordPress plugins such as Polylang, Beaver Builder, and Gravity Forms. Moreover, it is equipped with extensive documentation and live chat support to guide users and solve any issues.

[DOWNLOAD]

Add WordPress Custom Post Fields Manually and Edit Your Theme to Display Them

By default, the custom fields option is hidden in WordPress. To enable this feature, access your page or post editor.

Locate the Screen Options button on the right corner of your screen, and check the Custom Fields box.

Opciones de pantalla, resaltando el cuadro Campos personalizados Screen options, highlighting the Custom Fields box

This will make a new dialog box appear below the content editor.

Cuadro de diálogo de campos personalizados Custom fields dialog box

You can enter the custom field data using key/value pairs. The key refers to the name of your custom field, while the value is the information you want to display.

For example, we want to add a disclaimer to a sponsored post. So, we set Sponsored as the name and fill out Yes or No in the value box to show if the post was sponsored or not.

Adición de datos de campos personalizados mediante pares clave/valor Adding custom field data using key/value pairs

Hit the Add Custom Field button at the bottom of the box to save it.

However, the process doesn’t end there. WordPress only keeps custom field values on the back-end. To display the information on the front-end of the site, you need to edit the theme files.

There are several options for editing your theme files – through your admin dashboard, connecting to an FTP, or using Hostinger’s file manager.

Whichever method you choose, we recommend using a child theme to experiment freely without damaging the theme in the process.

In this tutorial, we will show you how to access files directly from the WordPress dashboard. Go to Appearance -> Theme Editor , then locate the single.php file .

Editor de temas, destacando el archivo single.php Theme Editor, highlighting the single.php file

Below is an example of code commonly used to display custom fields:

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

Note that the exact code you will use may vary depending on the action or information you want to display. However, be sure to replace the “key” placeholder with your custom field name.

In this example, we want to display a warning message for sponsored posts. So the code should look like this:

<?php $meta = get_post_meta( get_the_ID(), ‘Sponsored post’ ); if( $meta[0] == ‘Yes’ ) { ?> <center>This post contains affiliate links. We may earn a commission if you make a purchase using these links.</center>> <?php } ?>

What you want to do is add your code inside the WordPress loop, which is a function that tells WordPress what data to fetch and display when someone views content on your site.

A loop code may vary depending on the theme you are using. However, here is what the default WordPress loop looks like:

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php endwhile; sinon : ?> <?php endif; ?>

When adding a custom field, you are free to control its location on the site. For example, to place it at the top of an article, add the code before the following line:

tandis que ( have_posts() ) : the_post();

Lorsque vous avez ajouté avec succès le code à l’éditeur de thème, cliquez sur le bouton Mettre à jour le fichier pour enregistrer les modifications.

Le code que nous appliquons indique à WordPress de rechercher les publications avec des champs personnalisés de publication sponsorisée et de vérifier la valeur.

WordPress will display the disclaimer message if the value is set as Yes since the post is marked as sponsored. Otherwise, it won’t show any additional information or metadata.

An example of metadata in a WordPress post An example of metadata on a WordPress post

Keep in mind that the example above is one of the WordPress custom fields’ basic functions. To apply more complex actions, you will need to do some extra coding.

Below are several template tags you can use to customize the custom fields function on your website:

  • the_meta() – also known as post-meta, this tag displays a list of post custom fields.
  • get_post_custom() and get_post_meta() – retrieves a single or multiple metadata of a post.
  • get_post_custom_values() – fetches the values of a custom post field.

Conclusion

WordPress is equipped with advanced features like custom fields to enable users to add extra information to a post or a page, from disclaimers to images and checkboxes.

The WordPress built-in custom field functionality is hidden by default, so we’ve included steps on how to enable it.

In addition to that, we have also covered the steps of creating and using custom fields in WordPress:

  1. By installing the Advanced Custom Fields Plugin or any of the other three plugins suggested on the website.
  2. Manually editing your theme’s single.php file.

The native WordPress custom field feature might not be the most user-friendly technique. For this reason, we’ve included the option of using custom fields plugins to simplify the process.

We hope this guide has helped you understand how to apply and display your custom fields on WordPress websites. Feel free to leave questions in the comments section below.

Learn Other Advanced WordPress Techniques

How to Create a Shortcode in WordPress How to Speed Up WordPress How to Remove Sidebar in WordPress How to Use WordPress Icon Fonts WordPress A/B Testing Guide How to Create a Staging Envinorment in WordPress

Was this tutorial helpful?

Yes

No

Auteur Auteur

El autor

Will m

Will Morris es redactor del personal de WordCandy. Cuando no está escribiendo sobre WordPress, le gusta presentar su rutina de comedia stand-up en el circuito local.

Más de Will M.

Auteur Auteur

El coautor

nabilla r

Nabilla is a Digital Content Writer at Hostinger. She has a passion for website hosting and development and is keen to share her knowledge to help people further their online journey. When she’s not busy writing, she likes to explore nature and go on adventures.

More from Nabilla R.

How to Fix Custom Fields Not Showing in WordPress

Last updated on February 10th, 2021 by Editorial Staff | Reader DisclosureDisclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

Shares 57 Share Tweet Share Facebook Messenger WhatsApp Email

Are you unable to find the custom fields option on your WordPress site? Custom field is an advance WordPress feature that helps you add custom content to your WordPress posts and pages by following various WordPress tutorials. In this article, we will show you how to easily fix custom fields not showing issue in WordPress.

Fix missing custom fields in WordPress Fix missing custom fields in WordPress

Fixing Custom Fields Not Showing Issue in WordPress

Custom fields are typically associated with WordPress post, pages, or custom post types. Often you will find custom fields mentioned in various WordPress tutorials around the web, but you will likely not see the custom fields option on your site specially if you recently started your WordPress blog.

In the past, custom fields were visible by default on the post edit screen of all WordPress sites. However since it is an advance feature, the WordPress core development team decided to hide custom fields by default for all new users in the WordPress 3.1 release.

They also made it easy for anyone to make them visible with just two clicks from within the post edit screen.

Simply create or edit an existing post / page, and then click on the ‘Screen Options‘ button at the top right corner of the screen. This will show you a menu with several options that you can show or hide on your post edit screen.

Go ahead and click on the checkbox next to ‘Custom Fields’ option.

show custom fields Show Custom Fields

Note: If you don’t see the Custom Fields option on your site, then please scroll to the troubleshooting option below in the article.

Ahora puede desplazarse hacia abajo en la pantalla de edición de publicaciones y notará un nuevo metacuadro llamado “Campos personalizados” debajo de su editor de publicaciones.

Custom Fields area Custom Fields area

Dado que WordPress recuerda su elección de visualización, continuará mostrando el cuadro de campos personalizados cada vez que edite publicaciones en su sitio web.

Puede usar este cuadro para agregar, editar y eliminar campos personalizados y sus valores.

¿Qué son los campos personalizados? ¿Qué puedes hacer con ellos?

De forma predeterminada, cuando escribe una nueva publicación, página o cualquier tipo de contenido, WordPress lo guarda en dos áreas diferentes. La primera parte es el cuerpo de su contenido que agrega usando el editor de publicaciones.

The second part is the information about that particular content. For example, title, author name, date/time and more. This publication information is called metadata.

In addition to the default post metadata, WordPress also allows you to save custom metadata through the use of custom fields.

To learn more, check out our beginner’s guide to WordPress custom fields with examples, tips, and tricks you can use on your website.

WordPress developers use custom fields to store custom post metadata for their posts. For example, the All in One SEO plugin uses custom fields to store SEO settings for your posts.

snippet-meta-description-aioseo snippet-meta-description-aioseo

However, instead of using the default custom field box shown above, these plugin developers create their own custom meta boxes. This makes it easier for users to enter information.

If you want to create a custom metabox to easily enter custom metadata, check out our guide on how to add custom metaboxes in WordPress.

Problem solving

Recently, one of our readers approached us with an issue where the Custom Fields option was missing from the WordPress options screen. After some research, we were able to find the cause of the problem.

If your WordPress site is missing the Custom Fields option in the “Screen Options” menu, you should check if the Advanced Custom Fields (ACF) plugin is active on your site.

ACF is a very popular WordPress plugin that developers use to create custom metaboxes. ACF works on over a million websites.

In ACF version 5.5.13, they added a setting to remove the default WordPress custom field metabox to speed up post-edit page load times. The idea is that you shouldn’t need the default metabox since you’re using ACF.

However, if you need to enable the default WordPress custom field metabox, you need to add the following code to your WordPress theme’s functions.php file.

1

add_filter( ‘acf/settings/remove_wp_meta_box’ , ‘__return_false’ );

This will fix the missing custom fields option issue in WordPress.

We hope this article helped you resolve the issue of custom fields not showing up on your WordPress site. You can also check out our definitive list of the most useful WordPress tips, tricks, and hacks.

If you liked this article, please subscribe to our YouTube channel for WordPress tutorial videos. You can also find us on Twitter and Facebook.

Shares 57 Share Tweeter Share Facebook Messenger WhatsApp E-mail

Google Google Translate


Video WordPress custom fields not showing

Related Posts

Free chat room code for my website

Contents1 How to set up a free chat room on the website.2 3 comentarios2.1 Trackbacks/Pingbacks2.2 Submit a Comment Cancel reply3 How to Create a Chat Room Website…

Background image full screen css

Contents1 Cómo – Full Page Image1.1 Example1.2 Example2 CSS background image tamaño tutorial: how to codify a complete page background image3 Perfect Full Page Background Image3.1 Méthode CSS géniale,…

WordPress leverage browser caching

Contents1 Aproveche el almacenamiento in hidden del navegador1.1 Will it works for my website?1.2 Where are plugin options1.3 Some JavaScript files still display under Leverage Browser Caching1.4…

WordPress post to facebook page

Contents1 How to Automatically Post to Facebook from WordPress1.1 Download Now: How to Launch a WordPress Website [Free Guide + Checklist]1.2 1. Create an IFTTT account.1.3 2….

Download images from wordpress media library

Contents1 How to export your WordPress media library1.1 Download maintenant : How to launch a WordPress website [Free Guide + Checklist]1.2 How to export your WordPress media…

WordPress single post template

Contents1 How to Create Custom Unique Post Templates in WordPress2 Post Template Files2.1 author.php2.2 Fecha.php3 Handbook navigation4 How to Create Custom Single Post Templates in WordPress5 Video…