Add page-id-x class to body for pages. jamescollins. see #7939
git-svn-id: https://develop.svn.wordpress.org/trunk@11054 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a6fac0db89
commit
7252c98c54
@ -419,6 +419,9 @@ function get_body_class( $class = '' ) {
|
||||
setup_postdata($wp_query->post);
|
||||
|
||||
$pageID = $wp_query->post->ID;
|
||||
|
||||
$classes[] = 'page-id-' . $pageID;
|
||||
|
||||
if ( $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_parent = %d AND post_type = 'page' LIMIT 1", $pageID) ) )
|
||||
$classes[] = 'page-parent';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user