Wednesday, 24 July 2013

Understanding Custom Fields

A WordPress template contains static pieces of data that you can count on
to appear on your site. These static items include elements such as the title,
the content, the date, and so on. But what if you want more? Say you write a
weekly book-review post on your site and want to include a listing of recent
reviews and accompanying thumbnails of the books; you can, through the
use of Custom Fields, without having to retype the list each time you do a

review. You can add literally thousands of auto-formatted pieces of data like this (such as book reviews or movie reviews, for example) by adding Custom Fields on your WordPress blog.
You create Custom Fields on a per-post or per-page basis, which means that
you can create an unlimited amount of them and add them only to certain
posts. They help you create extra data for your posts and pages by using the
Custom Fields interface, which is covered in the following section.

So, what can you do with Custom Fields? Really, the only right answer is:
Anything you want. Your imagination is your only limit when it comes to the
different types of data you can add to your posts by using Custom Fields.
Custom Fields allow the site owner the flexibility of defining certain pieces of
data for each post.
To use Custom Fields, you do need a bit of knowledge about how to navi-
gate through WordPress theme templates because you have to insert a
WordPress function tag, with specific parameters, in the body of the tem-
plate file. Book VI takes you through all the information you need to know in
order to understand WordPress themes, templates, and template tags — so
you may want to hit that minibook before you attempt to apply what we
discuss in the rest of this chapter. If you’re already comfortable and famil-
iar with WordPress templates and tags, then you probably won’t have any
trouble with this chapter at all.

0 comments:

Post a Comment