Add body class "past-event" to single event view
-
Hi there! I want to add a body class to the single event view if the event is a past event. My code (in functions.php) reads like:
add_filter( 'body_class','my_body_classes' ); function my_body_classes( $classes ) { if( tribe_is_past() ) { $classes[] = 'past-event'; } return $classes; }
But it doesn’t work. Any suggestions?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Add body class "past-event" to single event view’ is closed to new replies.