Very recently, I have download the WordPress 3.0 and installed on my laptop and office PC also. Just after downloading, I thought about the new buzzwords going around for WordPress 3.0. and few points attracted my eye were these:
- WordPress and WordPress MU have merged. This means we can run multiple sites on same wordpress installation,
- New custom menu management feature,
- Custom header and background APIs,
- Contextual help text accessed under the Help tab of every screen in the WordPress administration,
- Ability to set the admin username and password during installation (good for security),
- Improved Custom Post Types and Custom Taxonomies.
Having read the benefits of WordPress 3.0, I pounced on few things after installation was custom masthead and Custom Fields. I have played with Custom Masthead feature first and then use Custom Fields. It is a good functionality added to WordPress 3.0 but it is not a great one now. I will tell you later why I think so.
For using a Custom Fields, you need to add
<strong><?php the_meta(); ?></strong> to your single post template (single.php).
The Custom fields will come on bottom of each post. The above image show where I have added the custom field tag to show custom fields on each post. Please change position to perfectly appear on your blog's post page.
Now you need to add data to custom fields. It is optional and it depends on your WP theme. Go to any post and look after the post editor box. You should see Box. For me it is coming after Post, Excerpt, Send Trackback. All box there are draggable so you can drag according to your suitability. I have added key as 'Author' and Value as 'Satya'. and it will come like this - <b>Author: Satya</b>. It usage the source code as below:
<ul class='post-meta'> <li><span class='post-meta-key'>Key1:</span> Value1</li> <li><span class='post-meta-key'>Key2:</span> Value2</li> </ul>
So, depending on style setting one has for list, the look will come on page. Using CSS class name (post-meta),
CSS can be added to to change the appearance of the Custom Field output.
Why this Custom Fields functionality is not Great now?
If you want to use a certain value on all posts, you cannot do that! What ever you enter on a post in key value pair fields will appear on that post and only key will carry to all post. So you can use that key on another post. Value for custom field need to enter manually on each post. This is only good if you like to enter new text for each post. If we can set it so that certain text can appear on each posts then I want to use this feature for various usage like Facebook Like button, etc., then I can think of that as I got a place which can be customized from the post itself.