<?php
function add_subtitle($title, $id) {
$subtitle = get_post_meta($id, 'myCustomField', true);
$new_title = $title;
if(!empty($subtitle))
$new_title = $subtitle . ': ' . $new_title;
return $new_title;
}
add_filter('the_title', 'add_subtitle', 10, 2);
Basically, this uses the the_title
filter to add the subtitle to your title. It only adds it if that custom field is available, otherwise, it leaves the title alone.