Home › Forums › Calendar Products › Events Calendar PRO › Displaying the Time Only
- This topic has 12 replies, 4 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
November 1, 2011 at 3:09 pm #10427
Anthony D’Arco
ParticipantIn the table.php, I added: That that displays the start time perfectly, except that for full day events it shows 12:00 a.m. I looked in FAQs and found this bit of code:
(get_post_meta($e->ID, ‘EventAllDay’, true) == ‘yes’) { // do something.
However, I don’t know how to use that last bit of code that is supposed to make it so that it doesn’t display anything when the event is all day. In the old calendar it just did it automatically (if I’m not mistaken).November 1, 2011 at 4:32 pm #10432Rob
MemberHey Anthony. When you said it did it automatically, are you saying you didn’t have to modify table.php at all? If so, can you give me the steps you went through to create this (so I can follow them on my 1.3.3 install, and make sure whatever was missed carries over to 2.0)? Thanks in advance.
November 1, 2011 at 5:00 pm #10449Anthony D’Arco
ParticipantNo, I modified the table.php with this code:
And it automatically (at least from what I could tell), sorted out which events were All Day events and didn’t put a start time. When I tried it in the new version, with:
I didn’t get the same results.
November 1, 2011 at 5:21 pm #10460Rob
MemberWeird. Since I’m not seeing the code directly (it gets stripped out by the editor here, looks like) it’d be awesome if you could send it my way in a .txt file (rob at tri.be) and i could test on my end.
November 9, 2011 at 4:15 pm #10871Rob
MemberHey Anthony – just a heads up that I haven’t forgotten about this one. We’ve been a bit shorthanded on the dev/support side until this week, but I’ve got a developer looking at it now and should have you a response by the end of the week. Apologies for the delay so far.
November 10, 2011 at 1:59 pm #10926Jonah
ParticipantHi Anthony,
You should be able to use:
if(get_post_meta($e->ID, ‘EventAllDay’, true) == ‘yes’) {
//display this code only for all day events
} else {
//display this code only for all other events
}
Have you tried it like that?
If that still doesn’t work I’ll need to take a look at your table.php template to see what all code you have there. You can use something like http://pastebin.com/ to paste in your code and share the link here.
Hopefully that helps.
Thanks,
JonahNovember 14, 2011 at 3:03 pm #11074Anthony D’Arco
ParticipantJonah,
Yeah that didn’t work, that may have been because without a bit of modification all I was getting was error message. Here is what I have.
Thank you,
AnthonyNovember 15, 2011 at 9:01 pm #11151Jonah
ParticipantHi Anthony,
I’m going to need to see your entire table.php file. Can you please post this?
Thanks,
JonahNovember 28, 2011 at 1:09 pm #11513Anthony D’Arco
ParticipantSorry this took so long to get back to you, too much holiday fun. Here is the link:
Thank you,
AnthonyNovember 29, 2011 at 8:06 pm #11523Jonah
ParticipantHi Anthony,
It turns out there’s a new tag to check for an all day event: tribe_get_all_day()
So just use:
if(tribe_get_all_day()) {
instead of:
if(get_post_meta($e->ID, 'EventAllDay', true) == 'yes') {
Regards,
– JonahNovember 30, 2011 at 8:02 am #11537Anthony D’Arco
ParticipantThank you that worked like a charm.
November 30, 2011 at 7:23 pm #11564Rob
MemberExcellent to hear this worked, Anthony. Please let us know if you need anything else going forward or have any other issues.
July 2, 2015 at 7:33 am #974663Support Droid
KeymasterThis 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 ‘Displaying the Time Only’ is closed to new replies.
