Hi!
Since you are executing get_post_meta in the template files, it’s executed withing the current blogs context, which is in your case the parent site.
Instead of making this change in the template files, you should rather use a filter function which is executed within the search process, when the blog switching is still active – thus calling the get_post_meta in the correct context.
In your case you can access the “date” field after the result post-process with the ‘asp_result_date_after_prostproc’ filter like so:
[php]
add_filter( ‘asp_result_date_after_prostproc’, ‘asp_change_post_date’, 1, 3 );
function asp_change_post_date( $date, $post_id, $search_id ) {
$meta = get_post_meta( $post_id, "my_meta_key", true );
if ( !empty($meta) ) return $meta;
return $date;
}
[/php]