Adding a number to a date
You need get_the_time, not the_time to get the date (the latter echo‘s the value). You also need to re-evaluate how you’re trying to calculate the end date – you can’t just “add” the number of days. What if the event length was 3 but the start date was the 31st? if ( $event_length ) { … Read more