Home › Forums › Calendar Products › Events Calendar PRO › How do I get the year to show after the month and day on listings?
- This topic has 14 replies, 3 voices, and was last updated 9 years, 6 months ago by
Sarah Kerr.
-
AuthorPosts
-
September 26, 2016 at 8:35 pm #1169013
Sarah Kerr
ParticipantIs 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,
SarahSeptember 26, 2016 at 8:41 pm #1169020Sarah Kerr
ParticipantThe site that I like is https://www.milkwood.net/courses/
My site is still under construction.
Thanks,
SarahSeptember 27, 2016 at 1:56 pm #1169492Andras
KeymasterHey 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,
AndrasSeptember 27, 2016 at 2:13 pm #1169506Sarah Kerr
ParticipantPerfect, thanks!
September 27, 2016 at 7:07 pm #1169591Sarah Kerr
ParticipantOk, another question:
How do I get the location to show in the same way as they do on the other site?
Thanks
SarahSeptember 28, 2016 at 7:11 am #1169773Andras
KeymasterHey 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:
Hope this helps, let me know how it works out.
Cheers,
AndrasSeptember 28, 2016 at 7:13 am #1169777Sarah Kerr
ParticipantThanks 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,
SarahSeptember 29, 2016 at 2:40 am #1170264Andras
KeymasterHey 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,
AndrasOctober 5, 2016 at 11:06 am #1172855Sarah Kerr
ParticipantHi 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?October 6, 2016 at 7:51 am #1173205Andras
KeymasterHey 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,
AndrasOctober 6, 2016 at 12:49 pm #1173457Sarah Kerr
ParticipantHi Andras,
Here is the events page. You can see that the city is showing up below the meta data and not within it.
October 7, 2016 at 2:24 am #1173656Andras
KeymasterThat 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
October 7, 2016 at 10:19 am #1173833Sarah Kerr
ParticipantThat did it! Thank you for your help!
October 7, 2016 at 1:25 pm #1173884Andras
KeymasterHi 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,
AndrasPS: 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-calendarPS2: 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!!
-
AuthorPosts
- The topic ‘How do I get the year to show after the month and day on listings?’ is closed to new replies.
