Home › Forums › Calendar Products › Events Calendar PRO › Remove Recurring Event Info From Events List Widget
- This topic has 7 replies, 5 voices, and was last updated 9 years, 9 months ago by Leah.
-
AuthorPosts
-
June 11, 2014 at 5:10 pm #219671rebeccagillParticipant
Heya! With version 3.6+ the Events List widget now shows the recurring event info, which is breaking our design. I have not been able to find a way to disable the info from just the widget. The closest I can get is adding this to my functions.php file:
// Events Calendar – remove recurring event info
add_filter( ‘tribe_events_recurrence_tooltip’, ‘wsm_remove_tec_recurring_info’ );
function wsm_remove_tec_recurring_info( $tooltip ) {
if( !is_singular() )
$tooltip = ”;
return $tooltip;
}
That removes it everywhere but the single events page. However I would like to keep in place in the main events List view, and basically every place other that the widget.Is there a better conditional I can add to isolate this for just the Events List widget?
June 12, 2014 at 3:55 am #220552dchaneyParticipantJune 12, 2014 at 8:15 am #220943rebeccagillParticipantThanks for the response dchaney. I did see that thread as I was working through this. I would really prefer to not have the HTML code appear in the markup at all rather than go the somewhat hackish route of only hiding it with CSS.
June 12, 2014 at 8:50 am #220985BrookParticipantHowdy rebeccagill,
That is a good question. Like dchaney pointed out there is an easy way to hide the link using CSS mentioned in that thread (thanks dchaney!). If you prefer to truly remove it, then this is possible by following our themer’s guide and creating a theme override.
The file you want to override is /pro/widgets/list-widget.php. On line #64 replace :
<?php echo tribe_events_event_schedule_details(); ?>
With:
<?php $tep = TribeEventsPro::instance(); $tep->disable_recurring_info_tooltip(); echo tribe_events_event_schedule_details(); $tep->enable_recurring_info_tooltip();?>
Does that make sense to you? Were you succesfully able to hide the modification? Please let me know.
It is worth noting that we are going to be making the recurring events link an option in an upcoming version of our plugin. This might change the API, which will mean that when you upgrade to that version (now known yet which version) you might need to delete this theme override. So keep an eye on our release notes page. Cheers!
– Brook
June 12, 2014 at 10:36 am #221159rebeccagillParticipantHeya Brook!
Looks like I marked this as answered prematurely. When I replace my function with a modified /tribe-events/pro/widgets/list-widget.php file with that change you suggested the widget won’t show any recurring events at all. When I go back to my function above it shows the recurring events as expected without all the extra stuff in the $tooltip.So I guess I’ll either use my function or a little CSS hack for now. Looking forward to the updated version of the plugin where we can change that setting from the widget in the dashboard.
June 12, 2014 at 10:45 am #221177BrookParticipantHowdy rebeccagill,
Just to double check, have you read through the themer’s guide linked above? Theme overrides are a bit different than adding a function to functions.php.
That snippet I posted works great for me. Here is the exact code for my [theme-name]/tribe-events/pro/widgets/list-widget.php. When I run that theme override, it hides the link and tooltip, and any mention of “Recurring Event”. However, the recurring events themselves continues to show up in the List Widget they just do not state they are recurring.
– Brook
June 12, 2014 at 12:59 pm #221368Susan GoodmanParticipantThank you so much Brook. The override worked perfectly for me!!
July 17, 2014 at 5:48 pm #434395LeahMemberHi there,
I just wanted to drop in and update you on the status of this issue. We are working on a fix, but we were not able to include it in our upcoming release (3.7). Correcting this problem is still important to us and we hope to have a fix done for a future maintenance release. We will do our best to keep you updated here on our progress. Thank you for your patience and understanding while we work on this.
Best,
Leah -
AuthorPosts
- The topic ‘Remove Recurring Event Info From Events List Widget’ is closed to new replies.