Show Day Name next to Date Month View

Home Forums Calendar Products Events Calendar PRO Show Day Name next to Date Month View

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1635716
    Shea
    Participant

    Hi,

    I know that this needs to a template edit to the month/single-day.php. What we want to do is to add the day name next to the date on each day of the month. I can’t figure out how to call this from the tribe_events_get_current_month_day() function.

    Thanks for the help.
    -Rich

    #1637223
    Cliff
    Keymaster

    Hi, Shea/Rich.

    This is an example of some data that comes from tribe_events_get_current_month_day()https://cl.ly/317c1154f815

    You could do something like this with it:

    $datetime = DateTime::createFromFormat('Y-m-d', $day['date'] ); // 2018-10-04
    echo $datetime->format('D'); // Thu
    echo $datetime->format('l'); // Thursday

    You might also want to pass the time zone, but this is just a proof-of-concept.

    See https://secure.php.net/manual/datetime.createfromformat.php for more details.

    Please let me know how this goes for you.

    #1638187
    Shea
    Participant

    Hi Cliff,

    I tried the code you suggested on the single-day.php. You can see the edits that I made on lines 33 and 34 of the file https://gist.github.com/richsalvucci/6399b6b0a060646798a642540d590914. There is no change on the display. I have tried the file paths in my child theme of tribe-events/month and tribe-events/pro/month/ but neither path worked. Did I misplace the code in the file? Thanks for the help.

    -Rich

    #1638631
    Cliff
    Keymaster

    Rich, that code worked for me: https://cl.ly/7173ffb2048f

    Make sure to clear your browser and site caches.

    Let me know…

    #1638632
    Cliff
    Keymaster

    Oh, try unchecking “Enable the Month View Cache” at wp-admin > Events > Settings > Display tab.

    #1639969
    Shea
    Participant

    Hi Cliff,

    It is fixed now. It must have been a caching issue.Thanks for all of the help. I appreciate it.

    -Rich

    #1640376
    Cliff
    Keymaster

    You bet! Glad to hear and thanks for letting us know.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Show Day Name next to Date Month View’ is closed to new replies.