Custom Edits to Text Output of the Upcoming Events Widget and standard Single Events Page text

I want to make edits to the output of "Takes Place On/Took Place On" in the Upcoming Events widget as well as the Single Event pages.

For the Single Event page - I'm editing the but I can't seem to find the file to edit for the Upcoming Events Widget.

Can someone help with:

- Providing the file location/name I'm supposed to edit for the Upcoming Events Widget


- How can I update proof the changes?


  • Vinod Dalvi

    Hi @ThatGD,

    I hope you are well today and thank you for your question.

    You are making changes in the plugin file and these changes will be overwritten and lost when you update the plugin and you will have to make these changes again after plugin updation so instead of making changes in the plugin file, you can change this text by using any of the following methods.

    Use our following Ultimate Branding plugin and its Network Wide Text Change module to change the text.

    Or add the following code in the functions.php file of your child theme.

    function wpmu_gettext_with_context( $translated_text, $untranslated_text, $domain ) {
        if ( 'eab' == $domain ) {
            if (strpos($untranslated_text,'Takes place on') !== false) {
                $translated_text = str_replace( 'Takes place on', 'Edit Takes place on', $untranslated_text );
            } else if (strpos($untranslated_text,'Took place on') !== false) {
                $translated_text = str_replace( 'Took place on', 'Edit Took place on', $untranslated_text );
        return $translated_text;
    add_filter( 'gettext', 'wpmu_gettext_with_context', 10, 3 );

    You have to change the text 'Edit Takes place on' and 'Took place on' in the above code.

    Best Regards,
    Vinod Dalvi

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.