{"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":"2025-05-21T18:00:04","modified_gmt":"2025-05-22T01:00:04","slug":"guide-to-wp-custom-fields","status":"publish","type":"post","link":"https:\/\/www-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/","title":{"rendered":"How to Add Custom Fields to Your WordPress Posts"},"content":{"rendered":"\n<p>As you become comfortable with WordPress, you may want to start pushing its boundaries. This means experimenting with some of the platform\u2019s more advanced options, which includes learning how to create custom fields.<\/p>\n\n\n\n<p>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>An Introduction to Custom Fields<\/b><\/h2>\n\n\n\n<p>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>Custom fields are a somewhat more advanced WordPress feature that lets you add extra information to specific posts. That information is called \u2018metadata\u2019. 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 the more general WordPress users.<\/p>\n\n\n\n<p>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>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\/support\/article\/custom-fields\/\" target=\"_blank\" rel=\"noopener\">the WordPress Codex entry<\/a> on the topic.<\/p>\n\n\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>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>However, you\u2019ll first want to take a moment and <a href=\"https:\/\/www.dreamhost.com\/blog\/how-to-back-up-your-wordpress-website\/\" 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\/why-you-need-a-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>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>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\/uploads\/2022\/12\/wordpress-block-editor.png\" alt=\"Accessing Preferences from the WordPress Block Editor\" class=\"wp-image-38247 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/wordpress-block-editor.png.webp 1384w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/wordpress-block-editor-300x177.png 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/wordpress-block-editor-1024x604.png 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/wordpress-block-editor-768x453.png 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/wordpress-block-editor-600x354.png.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/wordpress-block-editor-1200x708.png.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/wordpress-block-editor-730x431.png.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/wordpress-block-editor-784x463.png.webp 784w, https:\/\/www-dev.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><\/div>\n\n\n<p>Then, select <i>Panels<\/i> from the popup menu and enable <i>Custom fields<\/i>. You\u2019ll now be prompted to <i>Enable &amp; Reload<\/i>:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"1129\" height=\"607\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/enabling-custom-fields-wordpress-block-editor.png\" alt=\"Enabling custom fields with the WordPress Block Editor\" class=\"wp-image-38246 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/enabling-custom-fields-wordpress-block-editor.png.webp 1129w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/enabling-custom-fields-wordpress-block-editor-300x161.png 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/enabling-custom-fields-wordpress-block-editor-1024x551.png 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/enabling-custom-fields-wordpress-block-editor-768x413.png 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/enabling-custom-fields-wordpress-block-editor-600x323.png.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/enabling-custom-fields-wordpress-block-editor-730x392.png.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/enabling-custom-fields-wordpress-block-editor-784x422.png.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/enabling-custom-fields-wordpress-block-editor-877x472.png.webp 877w\" data-sizes=\"(max-width: 1129px) 100vw, 1129px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1129px; --smush-placeholder-aspect-ratio: 1129\/607;\" \/><\/figure><\/div>\n\n\n<p>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\/uploads\/2022\/12\/add-new-custom-field-wordpress.png\" alt=\"Adding custom fields to a post in WordPress\" class=\"wp-image-38242 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress.png.webp 1854w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/add-new-custom-field-wordpress-300x66.png 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/add-new-custom-field-wordpress-1024x226.png 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/add-new-custom-field-wordpress-768x169.png 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/add-new-custom-field-wordpress-1536x339.png 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-600x132.png.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-1200x265.png.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-730x161.png.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-1460x322.png.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-784x173.png.webp 784w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-1568x346.png.webp 1568w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/add-new-custom-field-wordpress-877x193.png.webp 877w, https:\/\/www-dev.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><\/div>\n\n\n<p>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>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>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<h3 class=\"wp-block-heading\" id=\"h-step-2-add-conditional-code-to-your-theme-file\"><b>Step 2: Add Conditional Code to Your Theme File<\/b><\/h3>\n\n\n\n<p>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 about that. As we mentioned earlier, 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>Within WordPress, you\u2019ll want to navigate to <i>Tools &gt; Theme File Editor<\/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>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. In our example, you\u2019d want to add <a href=\"https:\/\/www.hongkiat.com\/blog\/create-wordpress-custom-field\/\" target=\"_blank\" rel=\"noopener\">this snippet<\/a>:<\/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>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>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>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<h2 id=\"h-using-plugins-to-manage-your-custom-fields\" class=\"wp-block-heading\"><b>Using Plugins to Manage Your Custom Fields<\/b><\/h2>\n\n\n\n<p>You now know how to add custom fields and metadata to your WordPress posts. However, what if you want to get more flexibility from this feature or just want to simplify the process?<\/p>\n\n\n\n<p>This is WordPress we\u2019re talking about, so of course, there are plugins that can help you out. There may not be a lot of plugins related to custom fields, but you can find a few quality options. For a great example, check out <a href=\"https:\/\/wordpress.org\/plugins\/advanced-custom-fields\/\" target=\"_blank\" rel=\"noopener\">Advanced Custom Fields<\/a>:<\/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\/uploads\/2022\/12\/advanced-custom-fields-wordpress-plugin.png\" alt=\"Advanced Custom Fields plugin.\" class=\"wp-image-38243 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin.png.webp 1548w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/advanced-custom-fields-wordpress-plugin-300x95.png 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/advanced-custom-fields-wordpress-plugin-1024x324.png 1024w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/advanced-custom-fields-wordpress-plugin-768x243.png 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/advanced-custom-fields-wordpress-plugin-1536x486.png 1536w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin-600x190.png.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin-1200x380.png.webp 1200w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin-730x231.png.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin-1460x462.png.webp 1460w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/advanced-custom-fields-wordpress-plugin-784x248.png.webp 784w, https:\/\/www-dev.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><\/div>\n\n\n<p>This very popular, free plugin streamlines the process of adding custom fields to WordPress. It also gives you more choices for where metadata can be added, such as users, media, and comments. Finally, it adds tools to provide more options for displaying custom field values within your theme files. There\u2019s even <a href=\"https:\/\/www.advancedcustomfields.com\/pro\/\" target=\"_blank\" rel=\"noopener\">a premium version<\/a> with even more functionality.<\/p>\n\n\n\n<p>If that plugin seems like overkill \u2014 and it can be for non-developers \u2014 <a href=\"https:\/\/wordpress.org\/plugins\/custom-field-suite\/\" target=\"_blank\" rel=\"noopener\">Custom Field Suite<\/a> is a solid alternative:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img decoding=\"async\" width=\"800\" height=\"257\" data-src=\"https:\/\/www.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/custom-field-suite-wordpress-plugin.jpg\" alt=\"Custom Field Suite WordPress plugin\" class=\"wp-image-38244 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/custom-field-suite-wordpress-plugin.jpg.webp 800w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/custom-field-suite-wordpress-plugin-300x96.jpg 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/custom-field-suite-wordpress-plugin-768x247.jpg 768w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/custom-field-suite-wordpress-plugin-600x193.jpg.webp 600w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/custom-field-suite-wordpress-plugin-730x235.jpg.webp 730w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2022\/12\/custom-field-suite-wordpress-plugin-784x252.jpg.webp 784w\" data-sizes=\"(max-width: 800px) 100vw, 800px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 800px; --smush-placeholder-aspect-ratio: 800\/257;\" \/><\/figure><\/div>\n\n\n<p>This tool is essentially a lightweight version of Advanced Custom Fields. It adds a handful of useful new custom field types to your site. Plus, it simplifies adding and managing custom fields without overwhelming you with too many new options.<\/p>\n\n\n\n<p>This can be a smart plugin to start with if you\u2019re looking to get more out of your custom fields. What\u2019s more, you can always switch to a more robust solution once you feel more confident with the process.<\/p>\n\n\n\n<p>Another robust option for managing custom fields and more complex content types is the <a href=\"https:\/\/crocoblock.com\/plugins\/jetengine\/custom-fields\/?ref=10673\" target=\"_blank\" rel=\"noreferrer noopener\">JetEngine plugin<\/a>. JetEngine is particularly well-suited for those using Elementor or Gutenberg, offering extensive features for creating and managing Custom Post Types (CPTs).<\/p>\n\n\n\n<p>With JetEngine, you can easily create CPTs through a user-friendly interface located in the WordPress dashboard under JetEngine &gt; Post Types. This plugin provides comprehensive settings for each CPT, including General Settings, Labels, Advanced Settings, Meta Fields, Admin Columns, and Admin Filters.<\/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\/uploads\/2024\/07\/jetengine-plugin.png\" alt=\"\" class=\"wp-image-47962 lazyload\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2024\/07\/jetengine-plugin.png.webp 760w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2024\/07\/jetengine-plugin-300x221.png 300w, https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/smush-webp\/2024\/07\/jetengine-plugin-600x442.png.webp 600w, https:\/\/www-dev.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>JetEngine also allows for custom meta storage, enabling you to store meta fields in a separate database table for improved performance and organization. Additionally, it supports hierarchical post types, custom slugs, and advanced query options, making it a versatile tool for developers looking to extend WordPress&#8217;s capabilities.<\/p>\n\n\n\n<p>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\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>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-dev.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/lazy-loading-transparent.webp\" data-srcset=\"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/themes\/blog2018\/assets\/img\/article-small-ad-cta-placeholder.webp 1x, https:\/\/www-dev.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      Want a Free Theme?\n    <\/h2>\n    <p\n      class=\"p--md\"\n    >\n      When you host with DreamHost you get access to our WP Website Builder tool and more than 200+ industry-specific starter sites for free!\n    <\/p>\n\n            <a\n            href=\"https:\/\/www.dreamhost.com\/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>As you become comfortable with WordPress, you may want to start pushing its boundaries. This means experimenting with some of the platform\u2019s more advanced options, which includes learning how to create custom fields. Adding a custom field to your WordPress post enables you to assign extra data to it. In turn, this helps you add [&hellip;]<\/p>\n","protected":false},"author":1062,"featured_media":38240,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_yoast_wpseo_metadesc":"Adding custom fields to your WordPress post enables you to add customizable content or feature configurations to specific posts. Learn all about them here!","toc_headlines":"[[\"h-an-introduction-to-custom-fields\",\"<b>An Introduction to Custom Fields<\/b>\"],[\"h-how-to-add-custom-fields-to-your-wordpress-posts-in-2-steps\",\"<b>How to Add Custom Fields to Your WordPress Posts (In 2 Steps)<\/b>\"],[\"h-using-plugins-to-manage-your-custom-fields\",\"<b>Using Plugins to Manage Your Custom Fields<\/b>\"],[\"h-add-custom-fields-to-wordpress-content\",\"<b>Add Custom Fields to WordPress Content<\/b>\"]]","hide_toc":false,"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 Premium plugin v26.3 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Add Custom Fields in WordPress - DreamHost<\/title>\n<meta name=\"description\" content=\"Adding custom fields to your WordPress post enables you to add customizable content or feature configurations to specific posts. Learn all about them here!\" \/>\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-dev.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=\"How to Add Custom Fields to Your WordPress Posts\" \/>\n<meta property=\"og:description\" content=\"Adding custom fields to your WordPress post enables you to add customizable content or feature configurations to specific posts. Learn all about them here!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www-dev.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=\"2025-05-22T01:00:04+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: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 Premium plugin. -->","yoast_head_json":{"title":"How to Add Custom Fields in WordPress - DreamHost","description":"Adding custom fields to your WordPress post enables you to add customizable content or feature configurations to specific posts. Learn all about them here!","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-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/","og_locale":"en_US","og_type":"article","og_title":"How to Add Custom Fields to Your WordPress Posts","og_description":"Adding custom fields to your WordPress post enables you to add customizable content or feature configurations to specific posts. Learn all about them here!","og_url":"https:\/\/www-dev.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":"2025-05-22T01:00:04+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_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-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#article","isPartOf":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/"},"author":{"name":"Jason Cosper","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#\/schema\/person\/2273b8bf7336df78f6d99a89c17253c4"},"headline":"How to Add Custom Fields to Your WordPress Posts","datePublished":"2022-12-05T15:00:38+00:00","dateModified":"2025-05-22T01:00:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/"},"wordCount":1466,"publisher":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/Adding-Custom-Fields-Feature.jpg","articleSection":["Developer Central","Tutorials","WordPress"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/","url":"https:\/\/www-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/","name":"How to Add Custom Fields in WordPress - DreamHost","isPartOf":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#primaryimage"},"image":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#primaryimage"},"thumbnailUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/Adding-Custom-Fields-Feature.jpg","datePublished":"2022-12-05T15:00:38+00:00","dateModified":"2025-05-22T01:00:04+00:00","description":"Adding custom fields to your WordPress post enables you to add customizable content or feature configurations to specific posts. Learn all about them here!","breadcrumb":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#primaryimage","url":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/Adding-Custom-Fields-Feature.jpg","contentUrl":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/12\/Adding-Custom-Fields-Feature.jpg","width":900,"height":598,"caption":"how to add Custom Fields to WordPress posts"},{"@type":"BreadcrumbList","@id":"https:\/\/www-dev.dreamhost.com\/blog\/guide-to-wp-custom-fields\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dhblog.dream.press\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Add Custom Fields to Your WordPress Posts"}]},{"@type":"WebSite","@id":"https:\/\/www-dev.dreamhost.com\/blog\/#website","url":"https:\/\/www-dev.dreamhost.com\/blog\/","name":"DreamHost Blog","description":"","publisher":{"@id":"https:\/\/www-dev.dreamhost.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www-dev.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-dev.dreamhost.com\/blog\/#organization","name":"DreamHost","url":"https:\/\/www-dev.dreamhost.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.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-dev.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-dev.dreamhost.com\/blog\/#\/schema\/person\/2273b8bf7336df78f6d99a89c17253c4","name":"Jason Cosper","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/02\/IMG_4807-scaled.jpeg","url":"https:\/\/www-dev.dreamhost.com\/blog\/wp-content\/uploads\/2022\/02\/IMG_4807-scaled.jpeg","contentUrl":"https:\/\/www-dev.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-dev.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-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/38237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/users\/1062"}],"replies":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/comments?post=38237"}],"version-history":[{"count":10,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/38237\/revisions"}],"predecessor-version":[{"id":61495,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/posts\/38237\/revisions\/61495"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/media\/38240"}],"wp:attachment":[{"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/media?parent=38237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/categories?post=38237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www-dev.dreamhost.com\/blog\/wp-json\/wp\/v2\/tags?post=38237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}