Home › Forums › Calendar Products › Events Calendar PRO › widget not linking to event
- This topic has 5 replies, 2 voices, and was last updated 10 years, 1 month ago by
Hunter.
-
AuthorPosts
-
March 21, 2016 at 3:20 pm #1092076
graham barnes
ParticipantHi I am experiencing the issue of the events on the mini calendar widget not linking to the single event page for a individual event here: http://www.bbdimension.com/files/wp6/ on the homepage., instead it just goes to ‘#’.
I followed the advice here but all checkboxes are checked: https://theeventscalendar.com/support/forums/topic/mini-events-calendar-widget-does-not-link-to-events-anymore/
I have uploaded some screenshots to dropbox: https://www.dropbox.com/s/jw5ax8xcswwie2s/events-calendar-widget1.png?dl=0 and https://www.dropbox.com/s/et613xlc6xk39gs/events-calendar-widget2.png?dl=0
I tried disabling all the plugins and switching to the default theme but no luck.
March 21, 2016 at 9:08 pm #1092189Hunter
ModeratorHello and sorry to hear about the issue,
I visited your site and experienced issues with the mini calendar widget. I then tested to see if I could reproduce the issue and was unable to. Next, I checked our logged bugs to see if anything has been reported but again, no luck :-/
With that said, I would probably start by right-clicking on your mouse and opening “Inspect” – from here you can identify issues and with that information, hopefully start to address those conflicts. Caching plugins are often times responsible for these types of issues.
Thanks for creating a thread and I wish you the best of luck. Thanks for choosing TEC!
March 22, 2016 at 3:25 am #1092226graham barnes
ParticipantHi,
Thanks for your reply, I don’t know if its a bug or not that is why I came here, I checked the console but no errors there, do you know what the template is that displays the grid and then I can look?March 22, 2016 at 9:23 am #1092390Hunter
ModeratorHey Graham 🙂
Check the /src/views/pro/photo.php for the grid view template. Let me know if you’re able to locate it.
Thanks for the update and enjoy your day!
March 22, 2016 at 1:42 pm #1092592graham barnes
ParticipantHi hunter,
No your mis understanding I am referring to the mini calendar grid, I have tracked it down to this function: tribe_events_the_mini_calendar_day_link() in src/widgets/template-tags/widgets.phpfunction tribe_events_the_mini_calendar_day_link() { $day = tribe_events_get_current_month_day(); $args = tribe_events_get_mini_calendar_args(); if ( $day['total_events'] > 0 ) { // there are events on this day if ( $args['count'] > 0 ) { // there is an event list under the calendar $html = '<a href="#" data-day="' . $day['date'] . '" class="tribe-mini-calendar-day-link">' . $day['daynum'] . '</a>'; } else { // there are no events under the calendar if ( tribe_events_is_view_enabled( 'day' ) ) { // day view is enabled ob_start(); tribe_the_day_link( $day['date'], $day['daynum'] ); $html = ob_get_clean(); } else { // day view is disabled, just show that there are events on the day but don't link anywhere $html = '<a href="javascript:void(0)">' . $day['daynum'] . '</a>'; } } } else { $html = '<span class="tribe-mini-calendar-no-event">' . $day['daynum'] . '</span>'; } echo apply_filters( 'tribe_events_the_mini_calendar_day_link', $html ); }Note this bit: $html = ‘<a href=”#” data-day=”‘ . $day[‘date’] ‘#’ I want it to link to the actual event, so how can i modify the code to do this?
For now I have just modified the code to be:
function tribe_events_the_mini_calendar_day_link() { $day = tribe_events_get_current_month_day(); $args = tribe_events_get_mini_calendar_args(); if ( $day['total_events'] > 0 ) { // there are events on this day if ( $args['count'] > 0 ) { // there is an event list under the calendar ob_start(); tribe_the_day_link( $day['date'], $day['daynum'] ); $html = tribe_the_day_link(); //$html = '<a href="'.tribe_the_day_link().'" data-day="' . $day['date'] . '" class="tribe-mini-calendar-day-link">' . $day['daynum'] . '</a>'; } else { // there are no events under the calendar if ( tribe_events_is_view_enabled( 'day' ) ) { // day view is enabled ob_start(); tribe_the_day_link( $day['date'], $day['daynum'] ); $html = ob_get_clean(); } else { // day view is disabled, just show that there are events on the day but don't link anywhere $html = '<a href="javascript:void(0)">' . $day['daynum'] . '</a>'; } } } else { $html = '<span class="tribe-mini-calendar-no-event">' . $day['daynum'] . '</span>'; } echo apply_filters( 'tribe_events_the_mini_calendar_day_link', $html ); }showing the link to that date using: tribe_the_day_link();
-
This reply was modified 10 years, 1 month ago by
graham barnes. Reason: found a suitable solution for now
March 23, 2016 at 1:18 pm #1093103Hunter
ModeratorGraham,
Thanks for clarifying a bit more and my apologies for leading you in the wrong direction. I’m glad you’ve got it working as desired, so I’ll close this thread out. Please open a new one if you’ve got any more questions.
Take care and enjoy your week 🙂
-
This reply was modified 10 years, 1 month ago by
-
AuthorPosts
- The topic ‘widget not linking to event’ is closed to new replies.
