Styling the Date
-
Hi,
I need to somehow change the style of the date. If I change the code in the core it works, but I don’t want to have to change the code with every update. I have tried adding a filter in my functions.php file, but either I’m missing something or its not possible, I’m not sure which. This is the closest I’ve gotten so far but the date that it’s giving me is today’s date and not the date of the event. What its supposed to look like is a box with a background with the date on top, month in the middle and year on the bottom. Is there any other way to achieve this? Thanks in advance!
function changeStartDate($eventStartDate){
$eventStartDate=apply_filters(‘gg_before_event_start_date’ ,'<div class=”fancy_date”><p class=”fancyday”>’) . date_i18n((‘d’),strtotime($meta[‘gg_event_date_start_standard_format’])).'</p><p class=”fancymonth”>’ . date_i18n((‘M’),strtotime($meta[‘gg_event_date_start_standard_format’])).'</p><p class=”fancyyear”>’ . date_i18n((‘Y’),strtotime($meta[‘gg_event_date_start_standard_format’])) . apply_filters(‘gg_after_event_start_date’ ,'</p></div>’);
return $eventStartDate;
}
add_filter(‘gg_event_start_date’,’changeStartDate’);
- The topic ‘Styling the Date’ is closed to new replies.