Changing Auto-generated Descriptions of Event Recurrence

Home Forums Calendar Products Events Calendar PRO Changing Auto-generated Descriptions of Event Recurrence

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1295527
    Aein
    Participant

    I know it is possible for overriding the auto-generated description using the “recurrence description” box, but I have a particular need.

    I would like all recurring events to have the same text being:

    Every [day / day of week / etc], [Start Date] – [End Date]

    Example #1

    I have a repeating everyday event starting June 12, ending June 16. (So Monday-Friday.)

    Instead of the auto-generated text always showing up as
    “An event every day that begins at 10:00am, repeating until June 16, 2017”

    I want it always to show up as
    “Every day, June 12 – June 16”

    Example #2
    I have a repeating Friday event starting April 7, ending June 9.

    Instead of the auto-generated text always showing up as
    “An event every week that begins at 3:00pm on Friday, repeating until June 9, 2017”

    I want it always to show up as
    “Every Friday, April 7 – June 9”

    How can I go about changing this?
    Than you so much.

    #1296898
    Barry
    Member

    Hi Aein,

    Thanks for posting!

    That sounds like a really neat customization, though also a relatively advanced one so I’m afraid the degree of support we can offer for this is rather limited. What I’d point you to, however, is the following filter hook:

    tribe_get_recurrence_text

    You can use this to override the default generated text using something like this (just a shell) which you could add either to a custom plugin or to your theme’s functions.php file:

    add_filter( 'tribe_get_recurrence_text', function() {
        return 'Your custom recurrence text';
    } );

    Of course you’d need a lot more in there, probably including calls to tribe_get_start_date() and Tribe__Events__Pro__Recurrence__Meta::getRecurrenceMeta(), but that shows the basic outline for making this sort of change.

    I do hope that helps and good luck with the project!

    #1315907
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Changing Auto-generated Descriptions of Event Recurrence’ is closed to new replies.