Code — Print the template as CSS class on body - martindubenet/Wordpress GitHub Wiki
Print Wordpress template informations as class within the front-end code so you can customize the CSS for a specific page or template.
body
tag.
Print CSS class on <body <?php { body_class(); } ?>>
For theme debugging
This will add ICL_LANGUAGE_CODE
, the WPML language variable, within the set of class names on the body
tag ONLY for loggin users.
<body <?php if ( is_user_logged_in() ) { body_class(ICL_LANGUAGE_CODE); } ?>>
Considering that only developers and authors logs in the Wordpress, this gives developers more tools to analyse and repair bugs or procede with change request in a theme that is new to them.