Breaking up time and date info for themeing.

Home Forums Calendar Products Events Calendar PRO Breaking up time and date info for themeing.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #80308
    jocwebsites
    Participant

    I searched and found a few threads but I haven’t been able to work out exactly how this works. On the list.php file which I’ve copied over to my theme I need to style the date and time different, and also print the day of the week the event will be on.

    So, currently in this file there’s

    What do I change to show the different broken up parts of this so I can style and place them in different areas?

    Cheers,
    Dan

    #80375
    Barry
    Member

    Hi Dan: I can’t see the code you posted – unfortunately the forum eats up code and so it’s best to share via Pastebin, Gist or a similar service.

    In list view the date/time information is typically generated by the following line of code within the list/single-event.php template:

    <?php echo tribe_events_event_schedule_details() ?>

    If you don’t want to use this and the formatting options provided by the tribe_events_event_schedule_details_formatting filter aren’t sufficient to meet your needs you could simply remove that line and replace it with your own code that produces the date information in whatever form you need.

    Please do check out our Themer’s Guide if you haven’t already done so (link over on the right under Useful Resources). Does that help?

    #80379
    jocwebsites
    Participant

    Hey Barry,

    Thanks, this does help. The code you posted is what I was trying to post. I looked through the themers guide but couldnt find the code to produce the specific information like date, day and time. Is that available there and I just missed it? I’ll have another look but if you know offhand that’d be helpful.

    Cheers,
    Dan

    #80392
    Barry
    Member

    Hi Dan:

    You mean so you can build up your own replacement? It probably is not the very easiest thing to find, but our technical docs cover the functions you will want to use, such as tribe_get_start_date().

    For instance, if you wanted to wrap the date, month and year in separate span elements you might try something like this which would let you target individual components from your stylesheet, etc.

    #80481
    jocwebsites
    Participant

    Hey Barry,

    That’s pretty much it exactly, thanks so much. Im going to look through the docs for the start and end time as well, but if someone happens to know them off-hand, let me know, I’d appreciate it.

    Cheers,

    #80482
    jocwebsites
    Participant

    Hey,

    Hah, nevermind, just realized the same php time and date formats bring up the time. 🙂

    #80504
    Barry
    Member

    Yes – both tribe_get_start_date() and tribe_get_end_date() use the standard PHP syntax for date formats – sorry for not making that clearer.

    It sounds like you’re on track now however and so I’ll go ahead and close this thread. If there is anything else we can help with please do go ahead and and create new threads as needed.

    Thanks!

    #982525
    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 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Breaking up time and date info for themeing.’ is closed to new replies.