How to show certain data on certain interval of period
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 … Read more