Plugin Author
shauno
(@shauno)
The docs included with the plugin explain how to manipulate the date, using PHP’s built in date functions. For your requirements, you would use:
<?php echo date('m/d/Y', strtotime(get_post_meta(get_the_ID(), 'date', true))); ?>
The time is a bit more tricky, but still just uses a little PHP to manipulate the stored time:
<?php
$apm = 'AM';
$time = explode(':', get_post_meta(get_the_ID(), 'time', true));
if($time[0] == '00') {
$time[0] = '12';
}else if($time[0] == 12) {
$apm = 'PM';
}else if($time[0] > 12) {
$time[0] -= 12;
$apm = 'PM';
}
echo $time[0].':'.$time[1].' '.$apm;
?>
Assuming you meta keys are ‘date’ and ‘time’ respectively. Just change them to what you have used otherwise.
Can you please let me where I have to use these php codes
Plugin Author
shauno
(@shauno)
In the theme’s template you planned on using before. That completely depends on your theme and your planned use.
Thank you, It’s working very well