Last active
June 9, 2017 14:04
-
-
Save danjjohnson/cc1d8eea8d9736534bbcd8ae0068644e to your computer and use it in GitHub Desktop.
Add 'position-filled' body class on filled single listings
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
add_filter( 'body_class', 'dj_add_position_filled_class' ); | |
function dj_add_position_filled_class( $classes ) { | |
global $post; | |
if ( $post->post_type !== 'job_listing' ) { | |
return $classes; | |
} | |
if ( is_position_filled( $post ) ) { | |
$classes[] = 'position-filled'; | |
} | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment