Created
September 24, 2021 19:39
-
-
Save lelandf/df59abf38e3b20aa30da12e5d6c1d295 to your computer and use it in GitHub Desktop.
[TEC] Remove date from calendar day view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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