Add Custom Field to wordpress theme

It is easy to add custom field on wordpress posts or pages
Just fill the custom field name and value. and echo the custom field where you want to display you value.

<?php echo get_post_meta($post->ID, 'customfieldname', true); ?>

If custom field value not available for certain page then you can use default value, like bellow code

<?php $cusField = get_post_meta($post->ID, 'customfieldname', true);
echo $cusField;
if($cusField == NULL )
{
?>
<img border="0" alt="" src="<?php bloginfo('template_url');?>/images/image.jpg">
<?php
}
?>