element
* @since 1.1.0
*/
function generate_main_classes( $classes ) {
$classes[] = 'site-main';
return $classes;
}
}
if ( ! function_exists( 'generate_post_classes' ) ) {
add_filter( 'post_class', 'generate_post_classes' );
/**
* Adds custom classes to the element.
* Remove .hentry class from pages to comply with structural data guidelines.
*
* @since 1.3.39
*/
function generate_post_classes( $classes ) {
if ( 'page' == get_post_type() ) {
$classes = array_diff( $classes, array( 'hentry' ) );
}
return $classes;
}
}