How to change the body class on homepage in WordPress

Body class on homepage different and other pages different in WordPress

How to change the body class on homepage in WordPress?

find this “function get_body_class” under “wp-includes/post-template.php”

function get_body_class( $class = '' ) {
global $wp_query;
$classes = array();
//Add this below code for add different class on homepage
if ( is_front_page() )
$classes[] = 'home';
443

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *