Recurring Event – Display All not showing All in popup

Home Forums Calendar Products Events Calendar PRO Recurring Event – Display All not showing All in popup

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1447365
    Sean
    Participant

    I have an event that has a recurring option for three other dates for the event.
    They are created with ONCE as the repeating option.

    However, when we hover over “See All”, the first event does not get listed.

    The screenshot below shows only two of the three events that you can clearly see on screen.

    Can you help please ?

    #1448939
    Victor
    Keymaster

    Hi Sean!

    Thanks for getting in touch with us. Let me help you with this topic.

    By default, that tooltip does not show the main event for the recurring instances, so that is the expected behaviour.

    However, I can see the point of wanting to have all the available instances for the event. Do you need the main event to always show up in the tooltip? If so, let me know and I will try to come up with a snippet to accomplish that.

    Thanks,
    Victor

    #1448955
    Sean
    Participant

    Yes we do.

    If you are in one of the “not main events” and hover over the tooltip activator, then I would expect it to show the main event, as that is another available date for that family of events, that’s just obvious to us.

    If you could let us have a snippet to achieve this please that would be great.

    #1451500
    Victor
    Keymaster

    Hi Sean!

    I’m sorry for a bit of delay here.

    Please let me note that we are fairly limited in how much support we can give for custom development questions. But, we always like helping out and at least point users into the right direction as much possible.

    I’ve come up with a snippet to add the first date of the recurring event series to the tooltip. You will need to copy and paste the following snippet into your theme’s functions.php file:

    /*
    * Add First Event date on recurring info tooltip
    */
    add_filter( 'tribe_get_recurrence_text', 'add_first_event_date' );
    function add_first_event_date( $recurrence_text ) {
        $parent_date = '<p>First Event on ' . tribe_get_start_date() . '</p>';
        $recurrence_text = $parent_date . $recurrence_text;
    
    return $recurrence_text;
    }
    

    Please try it out and let me know if it works for you.

    Best,
    Victor

    #1451563
    Sean
    Participant

    HI,

    This does not work correctly, as it just shows the current event date again, not the first event date for the appropriate set of events.

    [cid:[email protected]]

    Thank you

    Sean Clarke * Clarke Design * Helping your business untangle the web

    Email: [email protected]

    Web: http://www.clarkedesign.co.uk

    Tel: 01270 761331

    Clarke Website Design Ltd is registered in England and Wales under company number 07324906 and our registered office is at 9 Ossmere Close, Sandbach, Cheshire CW11 1FB

    Clarke Design is a trading name of Clarke Website Design Ltd. Clarke Design operates under the Clarke Website Design Ltd Terms and Conditions

    All email communications are private and confidential to the intended addressee. If you believe you have received this email in error please delete it and inform our office at: [email protected]

    #1451597
    Sean
    Participant

    HI,

    We’ve rewritten this code so that it works now.

    add_filter( ‘tribe_get_recurrence_text’, ‘cwd_add_first_event_date’ );
    function cwd_add_first_event_date( $recurrence_text ) {

    $recurrence_text = '';
    
    $date_format = tribe_get_datetime_format();
    $recurrence_start_dates = tribe_get_recurrence_start_dates();
    
    foreach ( $recurrence_start_dates as $recurrence_start_date ) {
        $recurrence_start_date_formatted = date( $date_format, strtotime( $recurrence_start_date ) );
    
        $recurrence_text .= '<p>Course on ' . $recurrence_start_date_formatted . '</p>';
    }
    
    return $recurrence_text;
    

    }

    Thank you
    Sean Clarke · Clarke Design · Helping your business untangle the web
    Email:    [email protected]
    Web:     http://www.clarkedesign.co.uk
    Tel:       01270 761331

    Clarke Website Design Ltd is registered in England and Wales under company number 07324906 and our registered office is at 9 Ossmere Close, Sandbach, Cheshire CW11 1FB

    Clarke Design is a trading name of Clarke Website Design Ltd. Clarke Design operates under the Clarke Website Design Ltd Terms and Conditions

    All email communications are private and confidential to the intended addressee. If you believe you have received this email in error please delete it and inform our office at: [email protected]

    #1452425
    Victor
    Keymaster

    Right on Sean! I’m glad you could tweak the code to achieve exactly what you were looking for 🙂

    Thanks for following up to share the code so others can also benefit from it.

    It seems you are set here so I’ll go ahead and close this thread, but don’t hesitate to open a new topic if anything comes up and we’ll be happy to help.

    Cheers,
    Victor

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Recurring Event – Display All not showing All in popup’ is closed to new replies.