Skip to content

Instantly share code, notes, and snippets.

@lelandf
Created September 24, 2021 19:39
Show Gist options
  • Save lelandf/df59abf38e3b20aa30da12e5d6c1d295 to your computer and use it in GitHub Desktop.
Save lelandf/df59abf38e3b20aa30da12e5d6c1d295 to your computer and use it in GitHub Desktop.
[TEC] Remove date from calendar day view
<?php
add_action( 'wp_footer', function() { ?>
<script>
(function () {
const dates = document.querySelectorAll( '.tribe-events-calendar-day__event-datetime .tribe-event-date-start' );
if ( ! dates ) {
return;
}
function splitter( date ) {
const array = date.textContent.split( '@ ' );
date.textContent = array[1];
}
dates.forEach( splitter );
})();
</script>
<?php });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment