Skip to content

Instantly share code, notes, and snippets.

@alexwcoleman
Last active September 9, 2017 16:25
Show Gist options
  • Save alexwcoleman/26dfad32e06f51dfb70ab4d81c562790 to your computer and use it in GitHub Desktop.
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.
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