How to not display some info on a recurring event in the sidebar widget?

Home Forums Calendar Products Events Calendar PRO How to not display some info on a recurring event in the sidebar widget?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #724752
    caum
    Participant

    Hi,
    I need to manage lot of recurring events. I activate the setup that allows to display only the first instance in the list-style view and it seems this setup apply too in the sidebar widget, which is a very good thing.
    But the following description of the recurrence is displayed (and with translation errors in french):
    |Recurring Event (See all)
    Every week on Monday, Tuesday, Wednesday, Thursday, and Friday, recurring 10 times
    see there my website: http://staging.americancenter.fr/anglais-cours/

    Is there any way not to display this description? (to me, information in the sidebar has to be very short and synthetic: I only need
    Best,

    David

    #725448
    Barry
    Member

    Hi David,

    How about if you add a short snippet like this one (to your theme’s functions.php file):

    [Update: please see revised code, below]

    Does that clear this up?

    #735690
    caum
    Participant

    Hi Barry,
    sorry for the delay, I didn’t get the email notification.
    And sorry again, but this snippet in the functions.php file doesn’t change anything.
    Any other suggest?

    Best,
    David

    #735850
    Barry
    Member

    Yes, apologies there – I was testing against a translatable string which is never a good idea. Can you try this revised version of the code?

    add_filter( 'dynamic_sidebar_params', 'remove_recurrence_from_widget_schedule_details' );
    
    function remove_recurrence_from_widget_schedule_details( $widget_params ) {
    	if ( 0 === strpos( $widget_params[0]['widget_id'], 'tribe-events-adv-list-widget' ) ) {
    		TribeEventsPro::instance()->disable_recurring_info_tooltip();
    		add_action( 'dynamic_sidebar_after', 'restore_recurrence_tooltip' );
    	}
    	return $widget_params;
    }
    
    function restore_recurrence_tooltip() {
    	TribeEventsPro::instance()->enable_recurring_info_tooltip();
    	remove_action( 'dynamic_sidebar_after', 'restore_recurrence_tooltip' );
    }
    #737196
    caum
    Participant

    Hi Barry,
    It works perfectly! Thanks for your support.
    Best,
    David

    #738164
    Barry
    Member

    Pleasure, glad it helped 🙂

    I’ll go ahead and close this thread but if any other issues crop up please don’t hesitate to create a new thread and one of the team will be only too happy to help.

    Also, if you have a moment to spare, we’d love to hear your thoughts and experiences with The Events Calendar in general over on our plugin review page – thanks again!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘How to not display some info on a recurring event in the sidebar widget?’ is closed to new replies.