Last active
September 9, 2017 16:25
-
-
Save alexwcoleman/26dfad32e06f51dfb70ab4d81c562790 to your computer and use it in GitHub Desktop.
Using Modern Tribe's "The Event Calendar". Just a simple <div> wrapper for a span. Nothing more, nothing less.
This file contains 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
function wrap_event_spans($span){ | |
// The original spit out a <span> with the Month/Year at the top of each month, but... | |
// there also seemed to be empty spans after each event | |
// This screwed up the Foundation XY Grid I wanted to use in List View | |
// So this is 2 birds one stone. Wrap the span, get rid of empty ones. | |
if( !$span ){ | |
return; | |
} | |
$op = '<div class="whatever classes are needed">' . $span . '</div>'; | |
return $op; | |
} | |
add_filter( 'tribe_events_list_the_date_headers', 'wrap_event_spans' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment