{"id":38237,"date":"2022-12-05T07:00:38","date_gmt":"2022-12-05T15:00:38","guid":{"rendered":"https:\/\/dhblog.dream.press\/blog\/?p=38237"},"modified":"2026-08-11T08:58:43","modified_gmt":"2026-08-11T15:58:43","slug":"guide-to-wp-custom-fields","status":"publish","type":"post","link":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/","title":{"rendered":"How to Add Custom Fields to Your WordPress Posts"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Here\u2019s a common headache: you publish the occasional sponsored post, and every one needs a disclosure notice you keep pasting in by hand. Custom fields solve this. They let you attach extra information, called metadata, to any WordPress post, like a label stuck on a file folder. To add one, open the post in the Block Editor, click the three-dot options menu, select <i>Preferences<\/i>, and turn on <i>Custom fields<\/i> under the <i>General<\/i> tab\u2019s <i>Advanced<\/i> section. A new panel below the post then accepts a Name (the key) and a Value.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Adding a custom field to your WordPress post enables you to assign extra data to it. In turn, this helps you add specific information or features only to particular posts. As an example, you could use a custom field to tell WordPress which of your posts are sponsored, then add some code to your theme file that will display a disclosure statement only on those posts.<\/p>\n\n\n\n<div class=\"article-newsletter article-newsletter--gradient\">\n\n\n<h2>Get Content Delivered Straight to Your Inbox<\/h2><p>Subscribe now to receive all the latest updates, delivered directly to your inbox.<\/p><form class=\"nwsl-form\" id=\"newsletter_block_\" novalidate><div class=\"messages\"><\/div><div class=\"form-group\"><label for=\"input_newsletter_block_\"><input type=\"email\"name=\"email\"id=\"input_newsletter_block_\"placeholder=\"Enter your email address\"novalidatedisabled=\"disabled\"\/><\/label><button type=\"submit\"class=\"btn btn--brand\"disabled=\"disabled\"><span>Sign Me Up!<\/span><svg width=\"21\" height=\"14\" viewBox=\"0 0 21 14\" fill=\"none\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n<path d=\"M13.8523 0.42524L12.9323 1.34521C12.7095 1.56801 12.7132 1.9304 12.9404 2.14865L16.7241 5.7823H0.5625C0.251859 5.7823 0 6.03416 0 6.3448V7.6573C0 7.96794 0.251859 8.2198 0.5625 8.2198H16.7241L12.9405 11.8535C12.7132 12.0717 12.7095 12.4341 12.9323 12.6569L13.8523 13.5769C14.072 13.7965 14.4281 13.7965 14.6478 13.5769L20.8259 7.39879C21.0456 7.17913 21.0456 6.82298 20.8259 6.60327L14.6477 0.42524C14.4281 0.205584 14.0719 0.205584 13.8523 0.42524Z\" fill=\"white\"\/>\n<\/svg>\n<\/button><\/div><\/form><\/div>\n\n\n<h2 id=\"h-an-introduction-to-custom-fields\" class=\"wp-block-heading\"><b>What are custom fields in WordPress?<\/b><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Custom fields are key\u2013value pairs of metadata attached to a WordPress post or page. Each field stores one extra piece of information (a name as the key and its value, such as \u201cSponsored Post: Yes\u201d) that themes and plugins can read and display conditionally, anywhere on your site.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The WordPress Block Editor is pretty flexible by default and enables you to customize your content to the Nth degree. You can add just about anything you like to your posts. However, the more content you have, the more you may start wishing for better ways to organize and manage it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Custom fields and metadata are of particular use to developers, who can use them to extend posts with all sorts of additional coding. However, they can still be beneficial for more general WordPress users.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-how-keys-and-values-work\"><b>How keys and values work<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Every custom field is a pair: the key is what the label says on the tab (<i>Sponsored Post<\/i>), and the value is what\u2019s written inside (\u201cYes\u201d). Type a key once and WordPress remembers it, offering it in a dropdown on every future post \u2014 which keeps a site-wide flag consistent instead of drifting into \u201csponsored\u201d, \u201cSponsored?\u201d, and \u201csponsored-post\u201d variants your theme code won\u2019t match. A single post can also hold several values under one key, and values aren\u2019t limited to yes\/no: an events site might give every event post an event_date field for its theme to sort by.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, let\u2019s say you wanted to indicate which of the posts on your blog are sponsored to ensure you\u2019re being transparent with your audience. You <i>could<\/i> add a short disclosure statement to each relevant post individually. Alternatively, you could save time by using a custom field that displays a relevant message. Then, you could add code to your theme file to make your disclosure statement appear on the correct posts.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If this sounds complex, don\u2019t worry. Using custom fields is more straightforward than it looks. In fact, we\u2019ll show you exactly how to implement this example below. If you\u2019re interested in other potential applications for custom fields and metadata, you may also want to check out <a href=\"https:\/\/wordpress.org\/documentation\/article\/assign-custom-fields\/\" target=\"_blank\" rel=\"noopener\">the WordPress documentation article<\/a> on the topic.<\/p>\n\n<h2 id=\"h-how-to-add-custom-fields-to-your-wordpress-posts-in-2-steps\" class=\"wp-block-heading\"><b>How to add custom fields to your WordPress posts (in 2 steps)<\/b><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The concept of custom fields might seem a bit abstract, so let\u2019s walk through an example to see exactly how this feature works in action. This general custom field process can be used for a wide variety of applications. You could add status updates to your posts, include a disclosure notice on sponsored content, and much more.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, you\u2019ll first want to take a moment and <a href=\"https:\/\/www.dreamhost.com\/blog\/how-to-back-up-wordpress-tutorial\/\" target=\"_blank\" rel=\"noopener\">back up your website<\/a>. If you\u2019re following these instructions, you\u2019ll be implementing changes to your theme\u2019s primary file, and you don\u2019t want to risk making any permanent mistakes. For extra security, creating <a href=\"https:\/\/www.dreamhost.com\/blog\/how-to-create-wordpress-child-theme\/\" target=\"_blank\" rel=\"noopener\">a child theme<\/a> and using it instead of your base theme is also advisable.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-step-1-enable-custom-fields-and-assign-new-metadata-to-your-post\"><b>Step 1: Enable custom fields and assign new metadata to your post<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The first thing you\u2019ll need to do is open up a post to which you would like to add a custom field. It can be an old post or a new one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click on the three dots in the top right corner and select <i>Preferences<\/i> from the dropdown list:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1384\" height=\"817\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/wordpress-block-editor.png.webp\" alt=\"Accessing Preferences from the WordPress Block Editor\" class=\"wp-image-38247 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/wordpress-block-editor.png.webp 1384w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/wordpress-block-editor-300x177.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/wordpress-block-editor-1024x604.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/wordpress-block-editor-768x453.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/wordpress-block-editor-600x354.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/wordpress-block-editor-1200x708.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/wordpress-block-editor-730x431.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/wordpress-block-editor-784x463.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/wordpress-block-editor-877x518.png.webp 877w\" data-sizes=\"(max-width: 1384px) 100vw, 1384px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1384px; --smush-placeholder-aspect-ratio: 1384\/817;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">In the Preferences window, stay on the <i>General<\/i> tab and scroll down to the <i>Advanced<\/i> section. Turn on the <i>Custom fields<\/i> toggle, then click <i>Select &amp; Reload Page<\/i> when prompted. The editor needs to reload for the change to take effect, so save your work first. (In older versions of WordPress, this toggle lived under a separate <i>Panels<\/i> tab; it moved with WordPress 6.5.)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, if you scroll down below the post, you\u2019ll find a new section:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1854\" height=\"409\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress.png.webp\" alt=\"Adding custom fields to a post in WordPress\" class=\"wp-image-38242 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress.png.webp 1854w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/add-new-custom-field-wordpress-300x66.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/add-new-custom-field-wordpress-1024x226.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/add-new-custom-field-wordpress-768x169.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/add-new-custom-field-wordpress-1536x339.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-600x132.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-1200x265.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-730x161.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-1460x322.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-784x173.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-1568x346.png.webp 1568w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-877x193.png.webp 877w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-1754x387.png.webp 1754w\" data-sizes=\"(max-width: 1854px) 100vw, 1854px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1854px; --smush-placeholder-aspect-ratio: 1854\/409;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Under <i>Name<\/i> and <i>Value<\/i>, you\u2019ll add some metadata describing the information you want to add to this post. Depending on the themes and plugins you have installed, you may already have some options listed under <i>Name<\/i>. Regardless, you\u2019ll want to create new metadata in this instance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Choose a name for your metadata. It can be anything, although it\u2019s best to keep it short and descriptive. Continuing our example from above about displaying a disclosure statement on specific posts, we\u2019ll call it <i>Sponsored Post<\/i>. Then we\u2019ll add a simple \u201cYes\u201d to the <i>Value<\/i> box, indicating that this particular post is sponsored.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click on <i>Add Custom Field<\/i>, and this metadata will now be assigned to your post. Don\u2019t forget to save or update the post itself too.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Don\u2019t see the panel at all? Some fields plugins, including Advanced Custom Fields, hide the native Custom Fields panel and replace it with their own interface. Also, meta keys that start with an underscore are protected, so WordPress never shows them here. There\u2019s a full troubleshooting rundown at the end of the next step.<\/p>\n\n<h3 class=\"wp-block-heading\" id=\"h-step-2-add-conditional-code-to-your-theme-file\"><b>Step 2: Display your custom field on your site<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The previous step told WordPress a critical piece of information about your post: whether or not it is sponsored content. Now, you need to add directions so that your site knows what to do with that label. How you do it depends on your theme. Classic themes use PHP template files you can edit directly. Block themes don\u2019t have those files, so they take a different route. We\u2019ll cover both.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-on-a-classic-theme-add-conditional-code\"><b>On a classic theme: add conditional code<\/b><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">This <i>does<\/i> involve a bit of coding. However, don\u2019t let that scare you off. Even if you aren\u2019t a developer, you should find the process relatively straightforward.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Within WordPress, you\u2019ll want to navigate to <i>Appearance &gt; Theme File Editor<\/i>. (If the editor shows up under <i>Tools<\/i> instead, you\u2019re running a block theme \u2014 skip ahead to the next section, since block themes don\u2019t use <i>single.php<\/i>.) Here, you can look through and make changes to the files that make up your site. You\u2019ll want to check out the sidebar on the right-hand side and find the <i>Single Post<\/i> file (also known as <i>single.php<\/i>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is where you\u2019ll add the code that will tell WordPress what to do in response to your custom fields. The exact code you\u2019ll use will vary somewhat, depending on what you want to do, and if PHP isn\u2019t your comfort zone, an AI assistant can adapt a snippet like this for your theme, swapping in your field name or output markup. In our example, you\u2019d want to add a conditional check built on WordPress\u2019s <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/get_post_meta\/\" target=\"_blank\" rel=\"noopener\">get_post_meta()<\/a> function:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\n$meta = get_post_meta( get_the_ID(), 'Sponsored Post' );\nif( $meta[0] == 'Yes' ) {\n?&gt;\n&lt;p&gt;This post is sponsored content, and we received a free copy of the product in order to conduct our review.&lt;\/p&gt;\n&lt;?php } ?&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then, click on the <i>Update File<\/i> button. This code tells WordPress to check and see if a post has the <i>Sponsored Post<\/i> custom field and if the value is set to \u201cYes\u201d. If so, it will display the message. If there is no custom field or the <i>Sponsored Post<\/i> value is set to \u201cNo\u201d, nothing extra will be added to the post.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Also, <i>where<\/i> you place the code will determine when it appears in the post. For example, to get it to appear at the top of the page, you would add it before this line in the <i>single.php<\/i> file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">while ( have_posts() ) : the_post();<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The snippet above prints fixed text, but you can just as easily output a field\u2019s value itself:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php echo esc_html( get_post_meta( get_the_ID(), 'Sponsored Post', true ) ); ?&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Notice the extra <i>true<\/i> in that call: it tells get_post_meta() to return the value as a plain string instead of an array, which is why the first snippet had to check $meta[0]. WordPress also ships the_meta(), which dumps every visible custom field on a post as a list, plus get_post_custom() and get_post_custom_values() for grabbing the raw data to format yourself.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-on-a-block-theme-use-block-bindings\"><b>On a block theme: use Block Bindings<\/b><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Block themes have no <i>single.php<\/i>, so the Theme File Editor route doesn\u2019t apply. Instead, WordPress 6.5 introduced the Block Bindings API, which connects a custom field to a block\u2019s attributes. It skips PHP templates, but it isn\u2019t zero-code either. Here\u2019s the actual workflow.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, register the field so the editor can read it. Per the Block Bindings reference, the meta must be registered with show_in_rest enabled, and the key can\u2019t start with an underscore. Add this to a child theme\u2019s functions.php or a small plugin:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">register_meta( 'post', 'sponsored_note', array(\n\t'show_in_rest' =&gt; true,\n\t'single'       =&gt; true,\n\t'type'         =&gt; 'string',\n) );<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Next, add your disclosure text in the Custom Fields panel under that key (<i>sponsored_note<\/i>). Finally, switch to the code editor view (in the same three-dot menu as Preferences) and give the Paragraph block that should display it a binding:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;!-- wp:paragraph {\"metadata\":{\"bindings\":{\"content\":{\"source\":\"core\/post-meta\",\"args\":{\"key\":\"sponsored_note\"}}}}} --&gt;\n&lt;p&gt;Placeholder text.&lt;\/p&gt;\n&lt;!-- \/wp:paragraph --&gt;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">On the front end, that paragraph now prints whatever the field contains. Bindings don\u2019t work on every block yet. The supported list covers the Paragraph and Heading content attributes, the Image block\u2019s id, url, title, alt, and caption, and the Button block\u2019s url, text, linkTarget, and rel, per <a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/block-api\/block-bindings\/\" target=\"_blank\" rel=\"noopener\">the Block Bindings reference<\/a>. For a deeper guided setup, the WordPress Developer Blog\u2019s walkthrough, <a href=\"https:\/\/developer.wordpress.org\/news\/2024\/02\/introducing-block-bindings-part-1-connecting-custom-fields\/\" target=\"_blank\" rel=\"noopener\">\u201cIntroducing Block Bindings, part 1: connecting custom fields\u201d<\/a> (February 2024), goes step by step.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hopefully, you are beginning to see how custom fields can be useful. There are a lot of possibilities when using this feature, so don\u2019t be afraid to play around a little and see what you can accomplish with it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-troubleshooting-custom-fields-not-showing\"><b>Troubleshooting: custom fields not showing<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If the Custom Fields panel (or a specific field) is missing, one of three things is usually going on:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><b>The panel is switched off.<\/b> It\u2019s hidden by default. Turn it on under <i>Preferences &gt; General &gt; Advanced<\/i> in the Block Editor, then let the editor reload.<\/li><li><b>A fields plugin is active.<\/b> Plugins such as Advanced Custom Fields hide the native panel and manage fields through their own interface, so edit your fields there instead.<\/li><li><b>The key is protected.<\/b> Meta keys that begin with an underscore (like <i>_thumbnail_id<\/i>) are reserved for internal use, and WordPress never displays them in the Custom Fields panel.<\/li><\/ol>\n\n<h2 id=\"h-using-plugins-to-manage-your-custom-fields\" class=\"wp-block-heading\"><b>Best WordPress custom fields plugins<\/b><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You now know how to add custom fields and metadata to your WordPress posts. Do you need a plugin at all? If all you want is a flag or two that your theme reads, like our Sponsored Post example, the native panel is enough: it\u2019s free, built in, and adds nothing to maintain. A plugin makes sense when you outgrow it. <a href=\"https:\/\/wordpress.org\/plugins\/advanced-custom-fields\/\" target=\"_blank\" rel=\"noopener\">Advanced Custom Fields<\/a> (ACF) is the free pick for structured fields without code, and <a href=\"https:\/\/crocoblock.com\/plugins\/jetengine\/\" target=\"_blank\" rel=\"noreferrer noopener\">JetEngine<\/a> is a paid toolkit for full dynamic-content sites. Here\u2019s what each actually does, and what each costs:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1548\" height=\"490\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin.png.webp\" alt=\"Advanced Custom Fields plugin.\" class=\"wp-image-38243 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin.png.webp 1548w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/advanced-custom-fields-wordpress-plugin-300x95.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/advanced-custom-fields-wordpress-plugin-1024x324.png 1024w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/advanced-custom-fields-wordpress-plugin-768x243.png 768w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/advanced-custom-fields-wordpress-plugin-1536x486.png 1536w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin-600x190.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin-1200x380.png.webp 1200w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin-730x231.png.webp 730w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin-1460x462.png.webp 1460w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin-784x248.png.webp 784w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin-877x278.png.webp 877w\" data-sizes=\"(max-width: 1548px) 100vw, 1548px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1548px; --smush-placeholder-aspect-ratio: 1548\/490;\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">ACF is free and organizes fields into <i>field groups<\/i>: you create a group, pick from more than 30 field types (text, image, date picker, and so on), then set a location rule that tells WordPress where the group appears, such as a post type, a page template, or a specific post. It can also register custom post types and taxonomies from its own interface, so a team directory (a \u201cStaff\u201d post type with role and photo fields) doesn\u2019t need a separate CPT plugin. The trade-off is a real learning curve: field groups and location rules take some getting used to, and you still need Step 2-style display work to show the values on the front end.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It also widens where metadata can live. The native panel covers posts and pages only; ACF attaches fields to users, taxonomy terms, media, and comments as well \u2014 the taxonomy option is how you\u2019d add, say, a banner image to each category archive. A paid ACF PRO version adds the Repeater and Flexible Content fields for repeatable layouts, a Gallery field, and custom options pages.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">JetEngine takes a different approach: it\u2019s a commercial dynamic-content plugin for Elementor, Gutenberg, and Bricks, listed by Crocoblock at $75 per year (on sale for $57 as of August 2026). For that, you get more than fields. JetEngine can create and structure custom post types, group them with taxonomies, and add custom fields to those post types, all from its own interface.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"760\" height=\"560\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2024\/07\/jetengine-plugin.png.webp\" alt=\"JetEngine plugin settings in the WordPress dashboard\" class=\"wp-image-47962 lazyload\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2024\/07\/jetengine-plugin.png.webp 760w, https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2024\/07\/jetengine-plugin-300x221.png 300w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2024\/07\/jetengine-plugin-600x442.png.webp 600w, https:\/\/www.dreamhost.com\/blog\/wp-content\/smush-webp\/2024\/07\/jetengine-plugin-730x538.png.webp 730w\" data-sizes=\"(max-width: 760px) 100vw, 760px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 760px; --smush-placeholder-aspect-ratio: 760\/560;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">JetEngine also offers Custom Content Types, a separate feature from ordinary custom fields that saves its metadata to a single dedicated table rather than standard post meta, plus a Query Builder for pulling that data into listings and filters on the front end. That power is also the drawback: JetEngine is a bigger system to learn than ACF, and it\u2019s overkill if a disclosure notice is all you need.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One thing to know before you commit to any plugin: your data outlives it. Custom field values are stored in your site\u2019s database (the postmeta table), so they survive a theme switch or a plugin deactivation. What disappears is the presentation (the display code or field-group interface) that you\u2019ll need to recreate in your new setup.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By exploring these plugins, you can enhance the functionality of your WordPress site and make managing custom fields and post types more efficient and tailored to your needs.<\/p>\n\n<h2 id=\"h-faqs-about-wordpress-custom-fields\" class=\"wp-block-heading\"><b>FAQs about WordPress custom fields<\/b><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-why-are-custom-fields-not-showing-in-wordpress\"><b>Why are custom fields not showing in WordPress?<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The panel is off by default: enable it in the Block Editor under <i>Preferences &gt; General &gt; Advanced<\/i>. If it\u2019s still missing, a fields plugin like Advanced Custom Fields may be hiding the native panel. Also, meta keys starting with an underscore are protected, so WordPress never displays them.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-can-you-add-custom-fields-to-taxonomies-or-categories\"><b>Can you add custom fields to taxonomies or categories?<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, but not with the built-in panel, which only covers posts and pages. WordPress stores term metadata under the hood, and a plugin such as Advanced Custom Fields lets you attach fields to categories, tags, or custom taxonomy terms \u2014 a banner image per category, for example.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-what-are-custom-fields-used-for\"><b>What are custom fields used for?<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Anything a post needs beyond its title and content: a sponsored-content flag, an event date, a review score, a book\u2019s author. Themes and plugins read those values to display extra information automatically, so you enter data once instead of hand-editing every post.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-do-i-need-a-plugin-to-add-custom-fields\"><b>Do I need a plugin to add custom fields?<\/b><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. WordPress includes a native Custom Fields panel that handles simple key\u2013value pairs, like the Sponsored Post flag in this tutorial. Reach for a plugin when you need repeatable or structured fields, an easier editing interface, or metadata on users, taxonomy terms, or media.<\/p>\n\n\n\n<h2 id=\"h-add-custom-fields-to-wordpress-content\" class=\"wp-block-heading\"><b>Add custom fields to WordPress content<\/b><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Custom fields and metadata are concepts that might seem a smidge confusing at first. However, with time and patience, you\u2019ll find that they enable you to get even more out of the WordPress platform.<\/p>\n\n\n\n\n\n<div\n\tclass=\"article-cta-shared article-cta-small\"\n>\n    <div class=\"tr-img-wrap-outer jsLoading\"><img decoding=\"async\" class=\"js-img-lazy \" src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/lazy-loading-transparent.webp\" data-srcset=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/article-small-ad-cta-placeholder.webp 1x, https:\/\/www.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/article-small-ad-cta-placeholder-x2.webp 2x\"  alt=\"Ad background image\" \/><\/div>\n\n\n\n\n  <div class=\"content-btm\">\n    <h2\n      class=\"h2--md\"\n    >\n      Build a Website in Minutes\n    <\/h2>\n    <p\n      class=\"p--md\"\n    >\n      Remixer, DreamHost\u2019s AI website builder, turns a plain-language description of your business into a polished site. Free for 30 days, no credit card required.\n    <\/p>\n\n            <a\n            href=\"https:\/\/www.dreamhost.com\/remixer-website-builder\/\"\n                        class=\"btn btn--white-outline btn--sm btn--round\"\n                                    target=\"_blank\"\n            rel=\"noopener noreferrer\"\n            >\n                            Start Building                    <\/a>\n\n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Here\u2019s a common headache: you publish the occasional sponsored post, and every one needs a disclosure notice you keep pasting in by hand. Custom fields solve this. They let you attach extra information, called metadata, to any WordPress post, like a label stuck on a file folder. To add one, open the post in the [&hellip;]<\/p>\n","protected":false},"author":1062,"featured_media":86895,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_yoast_wpseo_opengraph-title":"WordPress Custom Fields: How to Add Them - DreamHost","_yoast_wpseo_opengraph-description":"WordPress custom fields let you attach metadata to posts\u2014learn how to enable them in the Block Editor and use them, like adding sponsored post disclosures.","_yoast_wpseo_twitter-title":"WordPress Custom Fields: How to Add Them - DreamHost","_yoast_wpseo_twitter-description":"WordPress custom fields let you attach metadata to posts\u2014learn how to enable them in the Block Editor and use them, like adding sponsored post disclosures.","toc_headlines":"[[\"h-an-introduction-to-custom-fields\",\"What are custom fields in WordPress?\"],[\"h-how-to-add-custom-fields-to-your-wordpress-posts-in-2-steps\",\"How to add custom fields to your WordPress posts (in 2 steps)\"],[\"h-using-plugins-to-manage-your-custom-fields\",\"Best WordPress custom fields plugins\"],[\"h-faqs-about-wordpress-custom-fields\",\"FAQs about WordPress custom fields\"],[\"h-add-custom-fields-to-wordpress-content\",\"Add custom fields to WordPress content\"]]","hide_toc":false,"show_updated_at":"1","footnotes":""},"categories":[13129,550,696],"tags":[],"class_list":["post-38237","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developer-central","category-tutorials","category-wordpress"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WordPress Custom Fields: How to Add Them - DreamHost<\/title>\n<meta name=\"description\" content=\"WordPress custom fields let you attach metadata to posts\u2014learn how to enable them in the Block Editor and use them, like adding sponsored post disclosures.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress Custom Fields: How to Add Them - DreamHost\" \/>\n<meta property=\"og:description\" content=\"WordPress custom fields let you attach metadata to posts\u2014learn how to enable them in the Block Editor and use them, like adding sponsored post disclosures.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/\" \/>\n<meta property=\"og:site_name\" content=\"DreamHost Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DreamHost\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-12-05T15:00:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-08-11T15:58:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/Adding-Custom-Fields-Social.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jason Cosper\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"WordPress Custom Fields: How to Add Them - DreamHost\" \/>\n<meta name=\"twitter:description\" content=\"WordPress custom fields let you attach metadata to posts\u2014learn how to enable them in the Block Editor and use them, like adding sponsored post disclosures.\" \/>\n<meta name=\"twitter:creator\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:site\" content=\"@dreamhost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jason Cosper\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"WordPress Custom Fields: How to Add Them - DreamHost","description":"WordPress custom fields let you attach metadata to posts\u2014learn how to enable them in the Block Editor and use them, like adding sponsored post disclosures.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/","og_locale":"en_US","og_type":"article","og_title":"WordPress Custom Fields: How to Add Them - DreamHost","og_description":"WordPress custom fields let you attach metadata to posts\u2014learn how to enable them in the Block Editor and use them, like adding sponsored post disclosures.","og_url":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/","og_site_name":"DreamHost Blog","article_publisher":"https:\/\/www.facebook.com\/DreamHost\/","article_published_time":"2022-12-05T15:00:38+00:00","article_modified_time":"2026-08-11T15:58:43+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/Adding-Custom-Fields-Social.jpg","type":"image\/jpeg"}],"author":"Jason Cosper","twitter_card":"summary_large_image","twitter_title":"WordPress Custom Fields: How to Add Them - DreamHost","twitter_description":"WordPress custom fields let you attach metadata to posts\u2014learn how to enable them in the Block Editor and use them, like adding sponsored post disclosures.","twitter_creator":"@dreamhost","twitter_site":"@dreamhost","twitter_misc":{"Written by":"Jason Cosper","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#article","isPartOf":{"@id":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/"},"author":{"name":"Jason Cosper","@id":"https:\/\/www.dreamhost.com\/blog\/#\/schema\/person\/696d1ca9f2e23c846e02e04944e8fca4"},"headline":"How to Add Custom Fields to Your WordPress Posts","datePublished":"2022-12-05T15:00:38+00:00","dateModified":"2026-08-11T15:58:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/"},"wordCount":2591,"publisher":{"@id":"https:\/\/www.dreamhost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/08\/blog-hero-guide-to-wp-custom-fields-dreamops-2465fe0b1b1cd5fc0c75d58f.webp","articleSection":["Developer Central","Tutorials","WordPress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/","url":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/","name":"WordPress Custom Fields: How to Add Them - DreamHost","isPartOf":{"@id":"https:\/\/www.dreamhost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#primaryimage"},"image":{"@id":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/08\/blog-hero-guide-to-wp-custom-fields-dreamops-2465fe0b1b1cd5fc0c75d58f.webp","datePublished":"2022-12-05T15:00:38+00:00","dateModified":"2026-08-11T15:58:43+00:00","description":"WordPress custom fields let you attach metadata to posts\u2014learn how to enable them in the Block Editor and use them, like adding sponsored post disclosures.","breadcrumb":{"@id":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#primaryimage","url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/08\/blog-hero-guide-to-wp-custom-fields-dreamops-2465fe0b1b1cd5fc0c75d58f.webp","contentUrl":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2026\/08\/blog-hero-guide-to-wp-custom-fields-dreamops-2465fe0b1b1cd5fc0c75d58f.webp","width":1536,"height":1024},{"@type":"BreadcrumbList","@id":"https:\/\/www.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dreamhost.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Add Custom Fields to Your WordPress Posts"}]},{"@type":"WebSite","@id":"https:\/\/www.dreamhost.com\/blog\/#website","url":"https:\/\/www.dreamhost.com\/blog\/","name":"DreamHost Blog","description":"","publisher":{"@id":"https:\/\/www.dreamhost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dreamhost.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dreamhost.com\/blog\/#organization","name":"DreamHost","url":"https:\/\/www.dreamhost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dreamhost.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","contentUrl":"https:\/\/dhblog.dream.press\/blog\/wp-content\/uploads\/2019\/01\/dh_logo-blue-2.png","width":1200,"height":168,"caption":"DreamHost"},"image":{"@id":"https:\/\/www.dreamhost.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DreamHost\/","https:\/\/x.com\/dreamhost","https:\/\/www.instagram.com\/dreamhost\/","https:\/\/www.linkedin.com\/company\/dreamhost\/","https:\/\/www.youtube.com\/user\/dreamhostusa"]},{"@type":"Person","@id":"https:\/\/www.dreamhost.com\/blog\/#\/schema\/person\/696d1ca9f2e23c846e02e04944e8fca4","name":"Jason Cosper","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/02\/IMG_4807-scaled.jpeg","url":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/02\/IMG_4807-scaled.jpeg","contentUrl":"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/02\/IMG_4807-scaled.jpeg","caption":"Jason Cosper"},"description":"Jason is DreamHost\u2019s WordPress Product Advocate, based out of Bakersfield, CA. He is currently working on making our DreamPress product even better. In his free time, he likes to curl up on the couch and watch scary movies with his wife Sarah and three very small dogs. Follow him on Twitter.","url":"https:\/\/www.dreamhost.com\/blog\/author\/jasoncosper\/"}]}},"lang":"en","translations":{"en":38237,"es":38250,"pl":52408,"de":54318,"uk":54324,"pt":54384,"ru":54447,"it":68085,"fr":69770,"nl":69798},"pll_sync_post":{},"_links":{"self":[{"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/38237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/users\/1062"}],"version-history":[{"count":1,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/38237\/revisions"}],"predecessor-version":[{"id":86906,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/38237\/revisions\/86906"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/media\/86895"}],"wp:attachment":[{"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/media?parent=38237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/categories?post=38237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dreamhost.com\/blog\/wp-json\/wp\/v2\/tags?post=38237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}