Events+ Widget - Remove "Takes place on"

On my Upcoming Events it shows the title and then "Takes place on "date" from "time".

Could you please tell me how to remove "Takes place on" and "from".

Thank you.
Support Access is granted

    Sajid

    Hello Mary,
    Hope you are doing good today

    Since it is being added in the widget as a string without class so it is not possible with CSS code. However, you can try using the following jQuery code snippet. This will find and replace both text strings with null.

    function wpmudev_replace_some_text(){?>
    
    	<script type="text/javascript">
    		jQuery('.wpmudevevents-date_format-start').each(function() {
        var text = jQuery(this).text();
        jQuery(this).text(text.replace('from', ''));
    });
    
    jQuery('.wpmudevevents-date').each(function() {
        var text = jQuery(this).text();
        jQuery(this).text(text.replace('Takes place on', ''));
    });
    	</script>
    
    <?php }
    add_action( 'wp_footer', 'wpmudev_replace_some_text', 999 );

    To use this code, add in functions.php file of your child theme or use it as mu-plugin.

    If you go with mu-plugin route then, go to your /wp-content/ folder via FTP, and find the folder called "mu-plugins". If there is no folder with that name, then you'll want to create one. Then, create a file inside that folder, and give the file any name you like and paste the code in there.

    You don't need to activate that plugin, as it will be always be automatically activated. Please be sure to add a PHP start tag at the beginning of the code if you insert this code as a mu-plugin, like this:

    <?php

    Take care and have a nice day

    Best Regards,
    Sajid - WPMU DEV Support