Chapter 5: Working with Custom Fields

In This Chapter

  • Understanding what Custom Fields can do for you
  • Working with the Custom Fields interface
  • Adding custom field codes to your templates
  • Using custom fields in a variety of ways

In Book IV, Chapter 2, we discuss all the different elements you can add to your blog posts and pages when you publish them. By default, WordPress allows you to give your posts and pages titles and content, to categorize and tag posts, to select a date and time for publishing, and to control the discussion options on a per-post or per-page basis.

However, you may sometimes want to add extra items to your posts — items you may not want to add to every post, necessarily, but that you add often enough to make manually adding them each time you publish a nuisance. These items can include a multitude of things, from telling your readers your current mood to what you're currently listening to or reading — to pretty much anything you can think of.

WordPress gives you the ability to create and add metadata (additional data that can be addedto define you and your post) to your posts by using a feature called Custom Fields. In Book IV, Chapter 2, we briefly touch on the Custom Field interface on the Write Post screen in the Dashboard, and in this chapter, we go through Custom Fields in depth by explaining what they are and how to implement them, as well as offering some cool ideas for using Custom Fields on your site.

Get WordPress® All-in-One For Dummies® now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.