{"id":10824,"date":"2010-10-18T20:45:23","date_gmt":"2010-10-18T20:45:23","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/custom-metadata\/"},"modified":"2026-08-21T00:38:34","modified_gmt":"2026-08-21T00:38:34","slug":"custom-metadata","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/custom-metadata\/","author":483756,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.8.0","stable_tag":"0.8.0","tested":"7.1","requires":"6.4","requires_php":"7.4","requires_plugins":null,"header_name":"Custom Metadata Manager","header_author":"Automattic, Stresslimit & Contributors","header_description":"","assets_banners_color":"fcfcfc","last_updated":"2026-08-21 00:38:34","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/custom-metadata\/","header_author_uri":"https:\/\/github.com\/Automattic\/custom-metadata\/","rating":4.4,"author_block_rating":0,"active_installs":700,"downloads":16915,"num_ratings":5,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"0.1":{"tag":"0.1","author":"batmoo","date":"2010-10-19 20:16:05"},"0.2":{"tag":"0.2","author":"batmoo","date":"2010-10-23 04:15:28"},"0.3":{"tag":"0.3","author":"batmoo","date":"2011-07-10 13:57:01"},"0.5":{"tag":"0.5","author":"jkudish","date":"2011-09-01 19:36:46"},"0.5.1":{"tag":"0.5.1","author":"jkudish","date":"2011-09-04 04:40:40"},"0.5.2":{"tag":"0.5.2","author":"jkudish","date":"2011-09-11 20:46:26"},"0.5.3":{"tag":"0.5.3","author":"jkudish","date":"2011-09-12 05:35:08"},"0.5.4":{"tag":"0.5.4","author":"jkudish","date":"2011-10-24 03:47:41"},"0.5.5":{"tag":"0.5.5","author":"jkudish","date":"2011-11-16 07:47:39"},"0.5.6":{"tag":"0.5.6","author":"jkudish","date":"2011-12-03 07:35:09"},"0.5.7":{"tag":"0.5.7","author":"jkudish","date":"2011-12-08 07:03:20"},"0.6":{"tag":"0.6","author":"jkudish","date":"2012-01-14 06:49:13"},"0.7":{"tag":"0.7","author":"jkudish","date":"2012-01-16 20:41:43"},"0.7.1":{"tag":"0.7.1","author":"stresslimit","date":"2012-07-11 19:02:38"},"0.8.0":{"tag":"0.8.0","author":"automattic","date":"2026-08-21 00:38:34"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":"1","4":"1","5":"3"},"assets_icons":[],"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":3657970,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1","0.2","0.3","0.5","0.5.1","0.5.2","0.5.3","0.5.4","0.5.5","0.5.6","0.5.7","0.6","0.7","0.7.1","0.8.0"],"block_files":[],"assets_screenshots":{"screenshot-1.jpg":{"filename":"screenshot-1.jpg","revision":3657968,"resolution":"1","location":"assets","locale":"","width":789,"height":562},"screenshot-2.jpg":{"filename":"screenshot-2.jpg","revision":3657968,"resolution":"2","location":"assets","locale":"","width":722,"height":626},"screenshot-3.jpg":{"filename":"screenshot-3.jpg","revision":3657968,"resolution":"3","location":"assets","locale":"","width":1038,"height":619}},"screenshots":{"1":"A custom metabox added to the post editing screen.","2":"Custom fields registered against a user profile.","3":"Grouped fields displayed in a metabox with descriptions."}},"plugin_section":[],"plugin_tags":[2010,1487,11933,2994],"plugin_category":[],"plugin_contributors":[77494,78161],"plugin_business_model":[],"class_list":["post-10824","plugin","type-plugin","status-publish","hentry","plugin_tags-custom-fields","plugin_tags-custom-post-types","plugin_tags-meta-boxes","plugin_tags-metadata","plugin_contributors-automattic","plugin_contributors-garyj","plugin_committers-automattic","plugin_committers-batmoo","plugin_committers-cvernon","plugin_committers-jkudish"],"banners":{"banner":"https:\/\/ps.w.org\/custom-metadata\/assets\/banner-772x250.png?rev=3657970","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/custom-metadata_fcfcfc.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/custom-metadata\/assets\/screenshot-1.jpg?rev=3657968","caption":"A custom metabox added to the post editing screen."},{"src":"https:\/\/ps.w.org\/custom-metadata\/assets\/screenshot-2.jpg?rev=3657968","caption":"Custom fields registered against a user profile."},{"src":"https:\/\/ps.w.org\/custom-metadata\/assets\/screenshot-3.jpg?rev=3657968","caption":"Grouped fields displayed in a metabox with descriptions."}],"raw_content":"<!--section=description-->\n<p>Custom Metadata Manager gives developers a single, consistent API for adding custom fields to any object type in WordPress: <code>post<\/code>, <code>page<\/code>, any custom post type, <code>user<\/code> and <code>comment<\/code>. Rather than offering a point-and-click interface, it follows the WordPress approach of registering content in code, so your fields live alongside the rest of your theme or plugin.<\/p>\n\n<p>Fields are grouped into metaboxes, stored through the standard WordPress metadata APIs, and remain available even if the plugin is later deactivated. You can render fields with the built-in field types or supply your own display and sanitisation callbacks, and you can include or exclude fields and groups for specific objects, either by ID or through a callback.<\/p>\n\n<p>This approach is particularly useful when working across multiple environments (local, staging and production), because your field definitions travel with your code and need no database synchronisation.<\/p>\n\n<h3>Usage<\/h3>\n\n<p>Custom Metadata Manager is a developer-focused plugin: you register your fields and groups in code, typically from a theme's <code>functions.php<\/code> or your own plugin. The full API reference \u2014 object types, registering fields and groups, include and exclude rules, multifields and worked examples \u2014 is documented in <a href=\"DEVELOPERS.md\">DEVELOPERS.md<\/a>.<\/p>\n\n<h3>Contributing<\/h3>\n\n<p>Contributions are welcome. Please read <a href=\"CONTRIBUTING.md\">CONTRIBUTING.md<\/a> for how to set up a local environment, run the tests and submit a pull request.<\/p>\n\n<h3>Support<\/h3>\n\n<p>Please report bugs and request features through the <a href=\"https:\/\/github.com\/Automattic\/custom-metadata\/issues\">GitHub issue tracker<\/a>.<\/p>\n\n<h3>Credits<\/h3>\n\n<p>Custom Metadata Manager is maintained by <a href=\"https:\/\/automattic.com\">Automattic<\/a>, and was originally created by <a href=\"https:\/\/stresslimit.com\">Stresslimit<\/a>. Thank you to the many <a href=\"https:\/\/github.com\/Automattic\/custom-metadata\/graphs\/contributors\">community contributors<\/a> who have helped shape the plugin.<\/p>\n\n<h3>License<\/h3>\n\n<p>This program is free software; you can redistribute it and\/or modify it under the terms of the GNU General Public License, version 2 or later, as published by the Free Software Foundation. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the <a href=\"LICENSE\">LICENSE<\/a> file for the full licence text.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Install through the WordPress admin, or upload the plugin folder to your <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the Plugins menu in WordPress.<\/li>\n<li>Add the code to register your custom groups and fields to your theme's <code>functions.php<\/code> or your own plugin.<\/li>\n<li>Enjoy.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"why%20a%20code-based%20approach%20instead%20of%20a%20ui%3F\"><h3>Why a code-based approach instead of a UI?<\/h3><\/dt>\n<dd><p>Because the UI approach has been done many times before, and a code-based approach aligns more closely with the existing WordPress model for registering content, such as post types and taxonomies.<\/p>\n\n<p>This is a developer feature aimed at site builders. The main benefit becomes clear when you work across multiple environments (development, staging and production): you can replicate interfaces and features without worrying about database synchronisation.<\/p><\/dd>\n<dt id=\"why%20isn%27t%20the%20function%20just%20%60add_metadata_field%60%3F%20why%20the%20%60x_%60%20prefix%3F\"><h3>Why isn't the function just `add_metadata_field`? Why the `x_` prefix?<\/h3><\/dt>\n<dd><p>We are <a href=\"https:\/\/andrewnacin.com\/2010\/05\/11\/in-wordpress-prefix-everything\/\">namespacing our public functions<\/a>, and you should too. The <code>x_<\/code> prefix keeps the plugin's functions from clashing with anything else in WordPress core, themes or other plugins.<\/p><\/dd>\n<dt id=\"how%20do%20i%20use%20this%20plugin%3F\"><h3>How do I use this plugin?<\/h3><\/dt>\n<dd><p>See <a href=\"DEVELOPERS.md\">DEVELOPERS.md<\/a> for full instructions, and the <code>custom_metadata_examples.php<\/code> file for worked examples.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p>The full version history is recorded in <a href=\"CHANGELOG.md\">CHANGELOG.md<\/a>.<\/p>","raw_excerpt":"A code-only developer plugin for registering custom fields on posts, pages, custom post types, users and comments.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/10824","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=10824"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/batmoo"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=10824"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=10824"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=10824"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=10824"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=10824"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=10824"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}