Yup I have been modding wordpress again.
Here is a little snipit that some of you might find useful. You can use the get_post_meta() call to add additional fields to your wordpress posts.
Whist developing the latest theme I decided that I needed an equivalent to the_excerpt() for pages, or an into as so to speak.
All you need to do is add the following or an equivalent to your page loop, the div class and style are bespoke:
<?php
$key=”post-intro”;
$intro = get_post_meta($post->ID, $key, true);
if ($intro){
echo “<div class=’post-body’ style=’clear:both;’>”;
echo $intro;
echo “</div>”;
}
?>
Then if your page has a custom field of “post-intro” the value will be outputted.
