Home › Forums › Calendar Products › Events Calendar PRO › How to change date formatting
- This topic has 10 replies, 4 voices, and was last updated 9 years, 10 months ago by Brook.
-
AuthorPosts
-
March 1, 2014 at 6:49 am #111091pknvelpParticipant
Barry pointed me to the themer’s guide (https://theeventscalendar.com/support/forums/topic/monthly-agenda-view-acting-weird/) to change how dates are displayed. I can not find the class that formats the date displayed with an event. For example, month names are now before day numbers while in my language, the day’s number goed before the month name.
Also, in the widget, times are displayed as ‘maart 5 @ 20:00 – 21:30’. To older readers, the @ sign is just strange so I would like to use language instead.
March 3, 2014 at 11:58 am #111722BrookParticipantHowdy pknvelp,
This snippet here will make things even easier. For this particular date format change you will not need to even fiddle with theme overrides! Just drop this into your theme’s functions.php, underneath the first line “<?php”. If your theme does not have a functions.php file, go to your theme folder, create a new text document file called “functions.php”, and paste this text in the first line of the file “<?php”. On line 2 or 3, paste that snippet.
On line 4 of that snippet, you can replace the ‘ at ‘ with ant other string of text you want.
Does that make sense? Did that work for you? Please let me know. Cheers!
– Brook
March 4, 2014 at 7:54 am #112221CharlotteParticipantHello,
I was wondering about the same thing and followed your instructions. It worked fine on the events page, but in the mini-callendar that I have displayed in the widget. It sill shows up with the @ symbol. Would it be possible to make the changes here as well.Kind regards
CharlotteMarch 4, 2014 at 11:59 am #112406BrookParticipantHowdy Charlotte,
I would like to help if I can. It’s strange though, that code is changing the sidebar widget for me. Perhaps there is some sort of caching going on that is causing this change to not yet show up for you. Do you a caching plugin enabled perchance? Have you tried clearing your browser’s cache? Please let me know. Thanks!
– Brook
March 5, 2014 at 9:07 am #113329CharlotteParticipantThis reply is private.
March 5, 2014 at 1:27 pm #114000BrookParticipantYou are welcome Charlotte. That is a bit strange. I tested creating an event for next month, and it still uses my replacement text instead of the @ symbol. I truly have no idea why your site is behaving differently.
You could try searching through the plugin source code for ” @ ” (make sure to include the space on either side of the symbol) and replacing the relevant ones with your altered text. If it continues to use the wrong symbol after that, then we have encountered some strange voodoo indeed. I recommend an exorcism. 😉 This is not an ideal solution, it is more of a test just to see if the problem can be resolved.
Is the snippet working properly for you, pknvelp?
– Brook
March 6, 2014 at 9:27 am #115809CharlotteParticipantHello again,
Thought I open up the site I’m working since it might be cursed 😉 http://www.xactfashion.se (please have a look) The problem occur when I use the arrows at the top of the mini-calendar to flick forward to the next coming month. As you can see on the icon below the replacement for @ is kl. and is working fine in the beginning, but if you use the arrow and click forward to April the @ symbol is back. Also if I now go back to March the symbol is there as well. The upcoming eventlist works fine so it,s really just in the top field as I flick forward to the next month that is not correct.It doesn’t really matter and Im quite happy the way it is, but I’m the kind of person who find it very hard to let go of a problem. Where do I find the plugin source code?
Kind regards
CharlotteMarch 7, 2014 at 7:34 am #116194BrookParticipantThanks for sharing the link. That does remove any ambiguity. Oddly, when I do the exact same steps on my local install it works fine. The major difference between my install and yours is that I am running WP 3.8.1, TEC 3.4.1, and TEC PRO 3.4 Perhaps updating your install, when you are ready to do so, will fix it? If not, the only other thing I can think to try is that search and replace.
The source code is found within your /wp-content/plugins/ folders. You will see events-calendar-pro/ and the-events-calendar/ in there.
– Brook
June 3, 2014 at 6:37 am #200938sandrasParticipantThis reply is private.
June 3, 2014 at 6:37 am #200943sandrasParticipantThis reply is private.
June 7, 2014 at 2:06 pm #212066BrookParticipantSince this topic is now resolved it is being closed down. I am glad everyone was able to get that snippet working. Cheers!
– Brook
-
AuthorPosts
- The topic ‘How to change date formatting’ is closed to new replies.