0

I have created numerous custom fields for custom post types, but I am a loss at how to do it for normal post types.

The codex suggests doing it with in admin section but this seems to only apply to individual posts rather than all posts;

After you have written your post, scroll down to the area titled Custom Fields.

To create a new Custom Field called "Currently Reading", enter the text "Currently Reading" (without the quotes) in the text entry field titled Name.

The newly created Key ("Currently Reading") should now be assigned a Value, which in our case is the name of the book currently being read, "Calvin and Hobbes". Type "Calvin and Hobbes" in the Value field, again without the quotes.

Click Add Custom Field button to save this custom information for that post.

How can I create custom fields (without a plugin) for all normal posts and display them in the admin section?

  • 1
    It works exactly the same for all post types. The only problem is, older posts will not have these custom fields assigned if you chip in late. There is an answer on this site where you run an sql query once to assign custom fields to older posts, but frankly, I cannot remember where. Try the site search, you should find it :-) – Pieter Goosen Jun 4 '15 at 9:44
  • Thanks @PieterGoosen - I have it working. I have no need for the SQL query but thanks for suggesting it anyway. – myol Jun 4 '15 at 11:09
  • No problem, glad you solved your issue. Enjoy ;-) – Pieter Goosen Jun 4 '15 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.