Display End Times using PHP Functions

Home Forums Calendar Products Events Calendar PRO Display End Times using PHP Functions

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #68171
    quantafire
    Participant

    Hi,
    I have a very custom solution I’m using to display events exactly the way I need them to on our website, http://onetaste.us/how-to-om-class/
    The problem is, whenever I add this PHP line to my code:
    ID, true, ‘M j, Y’); ?>
    It only displays the START time and not the END time. I tried using the tribe_event_end_of_day function but that didn’t work out so great as it seems that’s for multi-day only. Can you help me add an event end time if the event is just ONE day long?

    Thanks!

    #68188
    Barry
    Member

    Hi quantafire,

    Unfortunately this forum doesn’t do the best job ever of handling posted snippets of code. Can you share that code a second time, but do so by linking to it via a service like Pastebin or Gist?

    Thanks!

    #68189
    quantafire
    Participant

    Yes, thanks Barry! http://pastebin.com/Uvce3yDX

    #68191
    Barry
    Member

    Does tribe_get_end_date() work for you? If you only want the time, for instance, you could do something like:

    echo tribe_get_end_date( null, true, ' ' );

    Noting the single space between single quotes is deliberate, so as to make the time display only (and not the date).

    #68195
    quantafire
    Participant

    Barry, it worked! Thanks so much!!

    #68290
    Barry
    Member

    Happy to hear it 🙂

    #981183
    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 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Display End Times using PHP Functions’ is closed to new replies.