Kriuchko
1/8/2019 - 2:38 PM

Bodyclass body class

Wordpress body class

add_filter( 'body_class', 'custom_class_names' );
function custom_class_names( $classes ) 
{
	if( is_page_template('pages/template-home.php') ){ $classes[] = 'active-scroll'; }

	if( is_page_template('pages/template-actueel.php') or is_page_template('pages/template-videos.php') or is_page_template('pages/template-teeltadvies.php') ){ 
		$classes[] = 'actueel'; 
	}

	if( is_page_template('default') ){ $classes[] = 'contact'; }

	if( is_home() ){ $classes[] = 'inspiratie'; }

	if( is_page_template('pages/template-team.php') or is_page_template('pages/template-producttypes.php') ){ $classes[] = 'team'; }

	if( is_page_template('pages/template-locaties.php') ){ $classes[] = 'locaties'; }

	if( is_tax( 'product-category' ) ){ $classes[] = 'filter'; }

	return $classes;
}