Skip to content

Instantly share code, notes, and snippets.

@benhuson
Created September 5, 2012 12:18
Show Gist options
  • Save benhuson/3635796 to your computer and use it in GitHub Desktop.
Save benhuson/3635796 to your computer and use it in GitHub Desktop.
Add wpml-{ICL_LANGUAGE_CODE} class to body tag #WordPress #WPML
/**
* Add wpml-{ICL_LANGUAGE_CODE} class to body tag
*/
function wpml_body_class( $classes ) {
if ( defined( 'ICL_LANGUAGE_CODE' ) )
$classes[] = 'wpml-' . strtolower( ICL_LANGUAGE_CODE );
return $classes;
}
add_filter( 'body_class', 'wpml_body_class' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment