Custom fields and how to use them

by Chris, Thu 17th Apr, 2008, in categories: Using Blogsome

Next time you’re writing a post, scroll down toward the bottom of the ‘Write post’ page before you hit ‘publish’, and you will find the ‘Custom fields’ section.

Using the custom fields is easy. But what are they for? Well, let’s say I’ve just done my main post but I also want to mention what I’m reading at the moment or what television programmes I’m watching. That’s exactly the sort of thing that the Custom Fields section is for. Here’s an example of how to fill in the boxes:

Custom fields.

As you can see, the ‘Key’ box is where you put what you’re doing (reading, listening to or watching something, or whatever). And the ‘Value’ box is where you give a little bit more information. It looks as if my secret is out, doesn’t it? According to the custom fields in the picture, I’m listening to Greenday.

After you have used the custom fields once or twice, the things that you enter in the ‘Key’ box will appear in a handy drop-down select box. Just choose the option you want. It’s as easy as that!

Custom fields select box.

the_meta

There’s just one more thing you have to do though, before your custom field information will show up on the page.

Go to Manage>Files on your dashboard, and choose Posts. This will take you to where you can edit your post.html template.

Choose where you want your custom fields to show, and write {the_meta} in the file, as shown below. A good place to put custom fields is at the end of a post.

Custom fields select box.

Styling custom fields

A quick look at the source code will show that custom fields are generated as an unordered list with the class of ‘post-meta’. Information entered in the ‘Key’ box is a span with the class of ‘post-meta-key’. If you are confident with CSS, custom fields can be styled just like any other element.

2 Comments »

  1. Visitor Blogger said,

    How can I increase my Backlinks? Thanks.

  2. chris at itsallbeta said,

    Not by giving me six links and pretending it’s a genuine comment, that’s for certain!

Leave a comment

Line and paragraph breaks automatic, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> . Your email address is required but is never displayed.

Comments must be approved before publication. Please note: it may take some time before your comment appears.



Anti-spam measure: please retype the above text into the box provided.