Displaying the Time Only

Home Forums Calendar Products Events Calendar PRO Displaying the Time Only

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #10427
    Anthony D’Arco
    Participant

    In 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).

    #10432
    Rob
    Member

    Hey 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.

    #10449
    Anthony D’Arco
    Participant

    No, 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.

    #10460
    Rob
    Member

    Weird. 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.

    #10871
    Rob
    Member

    Hey 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.

    #10926
    Jonah
    Participant

    Hi 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,
    Jonah

    #11074
    Anthony D’Arco
    Participant

    Jonah,

    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.

    http://pastebin.com/c30mMW6S

    Thank you,
    Anthony

    #11151
    Jonah
    Participant

    Hi Anthony,

    I’m going to need to see your entire table.php file. Can you please post this?

    Thanks,
    Jonah

    #11513
    Anthony D’Arco
    Participant

    Sorry this took so long to get back to you, too much holiday fun. Here is the link:

    http://pastebin.com/UmtUUkXQ

    Thank you,
    Anthony

    #11523
    Jonah
    Participant

    Hi 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,
    – Jonah

    #11537
    Anthony D’Arco
    Participant

    Thank you that worked like a charm.

    #11564
    Rob
    Member

    Excellent to hear this worked, Anthony. Please let us know if you need anything else going forward or have any other issues.

    #974663
    Support Droid
    Keymaster

    This 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.

Viewing 13 posts - 1 through 13 (of 13 total)
  • The topic ‘Displaying the Time Only’ is closed to new replies.