Simply filter the_title
to replace/append the post title with this post custom meta data.
I assume that you already know how to query your post custom meta data, and as such, that querying will be outside the scope of this answer. Let’s assume that you’ve queried the meta data, as $post_author_fname
and $post_author_lname
, and that you want to append these names to the beginning of the post title:
<?php
function wpse53575_filter_the_title( $title ) {
// Query post metadata here
$post_author_fname="";
$post_author_lname="";
// Concatenate:
$post_author name = trim( $post_author_fname . ' ' . $post_author_lname );
// If the name is not an empty string,
// append it to the post title
$new_title = ( '' != $post_author_name ? $post_author_name . ': ' . $title ? $title );
// return the result
return $new_title;
}
add_filter( 'the_title', 'wpse53575_filter_the_title' );
?>