{"id":10821629,"date":"2018-10-27T12:50:11","date_gmt":"2018-10-27T12:50:11","guid":{"rendered":"https:\/\/wordpress.org\/support\/?post_type=helphub_article&p=10821629"},"modified":"2023-01-11T19:45:04","modified_gmt":"2023-01-11T19:45:04","slug":"assign-custom-fields","status":"publish","type":"helphub_article","link":"https:\/\/wordpress.org\/documentation\/article\/assign-custom-fields\/","title":{"rendered":"Assign custom fields"},"content":{"rendered":"\n
WordPress has the ability to allow post authors to assign custom fields to a post. This arbitrary extra information is known as metadata<\/strong>. This metadata<\/strong> can include bits of information such as:<\/p>\n\n\n\n With some extra coding, it is possible to achieve more complex actions, such as using the metadata<\/strong> to store an expiration date for a post.<\/p>\n\n\n\n Metadata is handled with key\/value<\/strong> pairs. The key<\/strong> is the name of the metadata element. The value<\/strong> is the information that will appear in the metadata list on each individual post that the information is associated with.<\/p>\n\n\n\n Keys<\/strong> can be used more than once per post. For example, if you were reading two different books (perhaps a technical book at work and a fiction at home), you could create a “reading” key and use it twice on the same post, once for each book.<\/p>\n\n\n\n Here is an example of what this information might look like on your post:<\/p>\n\n\n\n Based upon our example above, let’s add two custom fields, one called “Currently Reading” and the other “Today’s Mood”. Please follow the below steps to add this information to a post using Custom Fields.<\/p>\n\n\n\nCurrently Reading<\/strong>: Calvin and Hobbes<\/em>
Today's Mood<\/strong>: Jolly and Happy<\/em><\/pre>\n\n\n\nUsage<\/h2>\n\n\n\n