How to add custom field to WordPress posts, pages?

WordPress has the ability to assign custom fields to a post. Each custom field is handled with key/value pairs. The key is the name of the custom field. The value is the information that you want to store in that custom field.

To add a new custom field to a WordPress post, you need to edit the post.
In the post editing page:

  • scroll down to the area titled Custom Fields
  • enter name and value of the custom field to the Name and Value columns
  • click Add Custom Field button to save this custom field

add-custom-field

If this is the first custom field on your WordPress site, you might need to click “Enter new” link to start adding the new custom field.

# Couldn’t find “Custom Fields” area

  • Custom fields are hidden by default, at the first time, you need to enable it:

    # For WordPress 5.0 and later

    + For older versions of WordPress, click the ellipsis icon (near the gear icon), click Options and check the Custom Fields box (under “Advanced Panels”).

    + For newer versions of WordPress, click the ellipsis icon (near the gear icon):

    click Preferences:

    click Panels and check the Custom Fields box (under “Additional”):

    # For WordPress 4.9.9 and prior

    + click on Screen Options tab at top right corner of the page:
    WordPress Screen Options

    + select the Custom Fields checkbox in the expanded area:
    Enable WordPress custom field

  • If you can’t see the Custom Fields option, the current post type might not support custom field.
    To add a new custom field for this post type, you can install a custom field plugin (for example: Advanced Custom Fields), it will help you to add a custom field to any post types easily.

After adding custom field, you can show custom field easily (read more)

Best regards,

Scroll to Top