Here’s a function you can put in functions.php.
function get_current_event() {
global $post;
$now = get_the_time('U');
$year = get_the_time('Y');
if($now >= strtotime("January 1 $year") && $now < strtotime("March 1 $year")) {
return get_post_meta($post->ID,'eventA',true);
}
if($now >= strtotime("March 1 $year") && $now < strtotime("October 15 $year")) {
return get_post_meta($post->ID,'eventB',true);
}
$nextyear = $year+1;
if($now >= strtotime("October 15 $year") && $now < strtotime("January 1 $nextyear")) {
return get_post_meta($post->ID,'eventC',true);
}
return false;
}
Then you can put this in your template:
print get_current_event();