How do I get the year to show after the month and day on listings?

Home Forums Calendar Products Events Calendar PRO How do I get the year to show after the month and day on listings?

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1169013
    Sarah Kerr
    Participant

    Is there a simple way for a non-techie to get the year to show on listings?

    I’ve attached two screen shots, one of my page without the year, and the other of a page I found through TEC gallery that shows the year.

    Thanks for any suggestions.

    Cheers,
    Sarah

    #1169020
    Sarah Kerr
    Participant

    The site that I like is https://www.milkwood.net/courses/

    My site is still under construction.

    Thanks,
    Sarah

    #1169492
    Andras
    Keymaster

    Hey Sarah,

    Thanks for reaching out!

    That can be done with a simple setting. Go to Events > Settings > Display tab > Date Format Settings section > Date without year and enter the format in there.

    If you want like: September 30, 2016, then use this: F j, Y

    If you want like: September 30th, 2015, then use this: F jS, Y

    Let me know if this helps.

    Cheers,
    Andras

    #1169506
    Sarah Kerr
    Participant

    Perfect, thanks!

    #1169591
    Sarah Kerr
    Participant

    Ok, another question:

    How do I get the location to show in the same way as they do on the other site?

    Thanks
    Sarah

    #1169773
    Andras
    Keymaster

    Hey Sarah,

    I took the assumption that you want to add the venue info to photo view.

    Further assumption based on the other site is that you want to show the city and the venue name separated by a comma. To achieve this, paste this snippet in your theme’s functions.php file:

    https://gist.github.com/andrasguseo/533ec767245651d024782f4df95e8189

    If you want to display different venue info, then it should be pretty easy to further customize. On this page you can find further functions that get you information about your venue:

    https://theeventscalendar.com/?s=tribe_get_venue&submit=Search&post_type%5B%5D=wp-parser-function&post_type%5B%5D=wp-parser-hook

     

    Hope this helps, let me know how it works out.

    Cheers,
    Andras

    #1169777
    Sarah Kerr
    Participant

    Thanks so much for this Andras.

    Actually, I just want the city, without venue to show in photo view (and ideally in widgets as well). I should have been more clear. Could you send the code for that?

    Thanks,
    Sarah

    #1170264
    Andras
    Keymaster

    Hey Sarah,

    I updated the code to show only the city. Here it is again.

    https://gist.github.com/andrasguseo/533ec767245651d024782f4df95e8189

     

    As for the widgets, do you want to show the city in both the Events Calendar widget and the Events List widget?

    Thanks and cheers,
    Andras

    #1172855
    Sarah Kerr
    Participant

    Hi Andras,
    Thank you for the code to make the city show up on our event listings. I’ve added it but it’s showing up below the meta data (date), is it possible to make it meta data so it shows up beside the date?

    #1173205
    Andras
    Keymaster

    Hey Sarah,

    Do you maybe have a link where I could take a look at this live? A dev site or something?

    Also it would be helpful if you could share your system information with me. Here’s a guide for that to help:
    https://theeventscalendar.com/knowledgebase/sharing-sys-info/

    Thanks,
    Andras

    #1173457
    Sarah Kerr
    Participant

    Hi Andras,

    Here is the events page. You can see that the city is showing up below the meta data and not within it.

    http://sarahkerr.ca/events/

    #1173656
    Andras
    Keymaster

    That would require a template override.

    Remove the snippet I shared with you before.

    Create a file in your child theme’s directory like wp-content/{your-theme}/tribe-events/pro/photo/single-event.php

    and copy this code in that file. (Or download the file and copy it into that directory.)

    https://gist.github.com/andrasguseo/2b73216592074ae3a59f428da55aa417

    If you need you can add further html elements like < span > around the tribe_get_city() part on line 44 to allow you for some formatting.

    This is about as much as I can provide on this. Let me know how that works out.

    Cheers,

    Andras

    #1173833
    Sarah Kerr
    Participant

    That did it! Thank you for your help!

    #1173884
    Andras
    Keymaster

    Hi Sarah,

    Woohoooo!!!! I’m glad it helped!

    I am going to go ahead and close this ticket, but if you need help on this or something else, don’t hesitate to open a new topic.

    Good luck with your project!

    Cheers,
    Andras

    PS: If you like our plugin, we would be happy to receive a review in the wordpress.org repository. Thanks!
    https://wordpress.org/support/view/plugin-reviews/the-events-calendar

    PS2: We’d be also grateful if you would give us feedback on your satisfaction with support. Just click on one of the classy looking emojis below. 🙂 If you can spare a few words, that’s even better. Doublethanks!!

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘How do I get the year to show after the month and day on listings?’ is closed to new replies.