Skip to content

Instantly share code, notes, and snippets.

@CEscorcio
Created May 29, 2013 14:26
Show Gist options
  • Save CEscorcio/5670664 to your computer and use it in GitHub Desktop.
Save CEscorcio/5670664 to your computer and use it in GitHub Desktop.
Adicionar o nome da página na class da página.
function add_body_class( $classes )
{
global $post;
if ( isset( $post ) ) {
$classes[] = $post->post_type . '-' . $post->post_name;
}
return $classes;
}
add_filter( 'body_class', 'add_body_class' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment