Last active
August 29, 2015 13:56
-
-
Save vajrasar/8840059 to your computer and use it in GitHub Desktop.
Body Class is only applying on main-page.php and not on list-page.php
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
<?php | |
//* Add custom body class to the head | |
add_filter( 'body_class', 'sk_body_class' ); | |
function sk_body_class( $classes ) { | |
if ( is_page_template( 'list-page.php' ) || is_page_template('main-page.php') || is_archive() ) | |
$classes[] = 'masonry-page'; | |
return $classes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment