Home › Forums › Calendar Products › Community Events › Day view showing Jan, 1 1970 as the date on all pages
- This topic has 3 replies, 2 voices, and was last updated 10 years, 1 month ago by
Brook.
-
AuthorPosts
-
March 8, 2016 at 11:47 am #1086373
Rick Richardson
ParticipantWe found another issue with our site after running the last update. When a user clicks on the date on the calendar to open the day view, the date always shows as Jan 1, 1970
March 10, 2016 at 2:12 am #1087090Brook
ParticipantHowdy Again Quickrick!
Thanks for reaching out. I just tried some testing and that doesn’t look like a bug in the calendar, but quite possible a conflict or a modification gone awry
I remember helping you with some title issues in the past. I’m wondering if that’s related to this. I remember you tried inserting a few things into your theme’s functions.php to modify the title. If one of those was setup wrong it could easily be causing this. Could you try temporarily switching themes and seeing if this goes away? If so, then we’ve narrowed it down! If you try removing or disabling the modifications you added to your functions.php I bet when you reenable the theme this issue will go away. If you share a copy of the modifications here I might be able to spot the error and help you correct the code.
Does that all make sense? Will that work for you? Please let me know.
Cheers!
– Brook
March 17, 2016 at 8:28 pm #1090767Rick Richardson
ParticipantHey Brook,
I finally figured out what was causing the date display issue. It was actually one of the previously suggested fixes for the title issue that I had tried to implement, and never removed after it did not solve that problem. It was the block of code to add into the functions.php file. Just thought I’d let you know what caused the issue in case someone else is trying to fix their titles, and then reports this issue as well.
<?php
add_filter(‘tribe_get_events_title’, ‘my_get_events_title’);
function my_get_events_title($title) {
if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
return ‘Events Calendar’;
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
return ‘Events Calendar’ . ‘ » ‘ . single_term_title(”, false);
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
return ‘Events List’;
} elseif( tribe_is_event() && is_single() ) { // Single Events
return get_the_title();
} elseif( tribe_is_day() ) { // Single Event Days
return ‘Events on: ‘ . date(‘F j, Y’, strtotime($wp_query->query_vars[‘eventDate’]));
} elseif( tribe_is_venue() ) { // Single Venues
return $title;
} else {
return $title;
}
}
?>March 18, 2016 at 3:57 am #1090858Brook
ParticipantThank you very much! I am happy you were able to find the cause. Please let us know if you ever need anything else. Cheers!
– Brook
-
AuthorPosts
- The topic ‘Day view showing Jan, 1 1970 as the date on all pages’ is closed to new replies.
