Home › Forums › Calendar Products › Events Calendar PRO › Only Show Event Time
- This topic has 6 replies, 4 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
August 2, 2013 at 7:43 am #58487336creativeParticipant
Hello:
I’m trying to only show the start time of an event. I have the event date in a separate section based on my design. I was trying to use the function below, but it isn’t working.
php echo tribe_get_start_date($post->ID, true, ‘ ‘);Anyone have any advice on how to only show the start time as well as am/pm, and nothing else?
Thanks!
August 2, 2013 at 7:49 am #58488snortonParticipantHey you can any date format you want!
here’s what you want (just wrap in a php tag):
echo tribe_get_start_date($post, false, $format = ‘g:i a’ );August 2, 2013 at 7:52 am #58489336creativeParticipantThanks for your help snorton. My issue above is that I’m trying to only display the start time, and not display the date at all. I have the date displayed elsewhere using the php time info.
August 2, 2013 at 7:56 am #58493snortonParticipantThe above won’t display your event date. tribe_get_start_date is the template tag to call the start date & time of the event for $post (current post), false turns off the time of the event (because it would otherwise display mm-dd-yyyy @ 00:00 AM – 00:00 PM), and $format readjusts to simply whatever date/time format you specify. In my example, this tag will only echo your start time in the format you asked for. If you changed false to true then it would display the start time in the specified format but still add @ 00:00 AM – 00:00 PM to the echoed text.
August 2, 2013 at 8:21 am #58496336creativeParticipantOh gotcha! Thanks for the clarification and help. This is exactly what I was needing!!!
August 5, 2013 at 10:05 am #58845LeahMemberThanks for helping out here snorton!
July 7, 2015 at 6:27 am #979764Support DroidKeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Only Show Event Time’ is closed to new replies.