Задача: Удалить неиспользуемые классы из функции post_class().
Решение: Есть фильтр. Подробнее о фильтрах здесь и здесь.
// Remove classes from post_class()
function dpw_remove_postclasses( $classes, $class, $post_id ) {
$classes = array_diff( $classes, array(
'hentry',
'post',
'format-standard',
'post-' . $post_id,
'type-' . get_post_type( $post_id ),
'status-' . get_post_status( $post_id ),
) );
return $classes;
}
add_filter( 'post_class', 'dpw_remove_postclasses', 10, 3 );
Источник: https://wordpress.stackexchange.com/questions/302055/remove-classes-from-post-class