Home › Forums › Calendar Products › Events Calendar PRO › How to get rid off the th from the day
- This topic has 6 replies, 3 voices, and was last updated 10 years ago by
Support Droid.
-
AuthorPosts
-
March 25, 2016 at 3:31 am #1093866
Wolfgang Leideck
ParticipantHello.
I am using the Events Calendar Pro at the right sidebar of my front page to show the events of the current week.
Every day has a headline with following format ‘Mon 21nd’ or ‘Do 24th’. In the configuration of the Events calendar I defined following format for the week day : D j. but this won’t show in the list view at the Headlines.
So my question is, how can I get rid off the extensions ‘nd’ or ‘th’?Thanks
WolfgangMarch 25, 2016 at 7:55 am #1093987George
ParticipantHey Wolfgang,
Thanks for reaching out!
Fixing this will unfortunately require a tiny bit of custom coding at this timeโhead to your theme’s functions.php file and try adding this snippet of code there:
add_filter( 'tribe_events_this_week_date_format', 'tribe_remove_suffix_from_this_week_date' );function tribe_remove_suffix_from_this_week_date( $date ) {
return 'j';
}
Let me know if this helps! ๐
โ George
March 25, 2016 at 2:49 pm #1094269Wolfgang Leideck
ParticipantThank you George, but the Code snippet doesn’t work.
I get following warningWarning: call_user_func_array() expects parameter 1 to be a valid callback, function 'tribe_remove_appendage_from_this_week_date' not found or invalid function name in /homepages/13/d467711818/htdocs/hundeschule/wp-includes/plugin.php on line 235And only the name of the day is displayed.
-
This reply was modified 10 years, 1 month ago by
Wolfgang Leideck.
March 26, 2016 at 10:45 am #1094443George
ParticipantHey there,
That warning is likely from a typo I fixed on the thread, but if you are seeing this over email or saw it before I updated the thread then the correction might not have been made yet. Instead of what I originally recommended, try this:
add_filter( 'tribe_events_this_week_date_format', 'tribe_remove_suffix_from_this_week_date' );function tribe_remove_suffix_from_this_week_date( $date ) {
return 'j';
}I hope this helps!
Sincerely,
GeorgeMarch 27, 2016 at 10:32 am #1094581Wolfgang Leideck
ParticipantThank you George.
The code works now.Sincerley,
WolfgangMarch 27, 2016 at 2:26 pm #1094604George
ParticipantAwesome! ๐
I’ll close up this thread for now, but open a new thread any time if there’s anything else we can help with.
โ George
April 11, 2016 at 9:35 am #1100854Support Droid
KeymasterThis 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. -
This reply was modified 10 years, 1 month ago by
-
AuthorPosts
- The topic ‘How to get rid off the th from the day’ is closed to new replies.
