posts ) { $classes[] = 'no-posts'; } } if ( class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'infinite-scroll' ) ) { $classes[] = 'infinite-scroll'; } return $classes; } add_filter( 'body_class', 'chained_body_classes' ); /** * Extend the default WordPress post classes. * * @since chained 1.0 * * @param array $classes A list of existing post class values. * @return array The filtered post class list. */ function chained_post_classes( $classes ) { if ( is_archive() || is_home() || is_search() ) { $classes[] = 'entry-card js-masonry-item'; } $classes[] = 'post-design-default'; if ( has_post_thumbnail() ) { if ( 'standard' === get_post_format() ) { $classes[] = 'has-post-thumbnail'; } } return $classes; } add_filter( 'post_class', 'chained_post_classes', 10, 1 ); /*----------------------------------------------------------------------------------------------- Chained Comments @package v1.0.0 ------------------------------------------------------------------------------------------------- */ if ( !function_exists( 'chained_comment' ) ) { /** * Display individual comment layout * * @since chained 1.0 */ function chained_comment( $comment, $args, $depth ) { static $comment_number ; if ( !isset( $comment_number ) ) { $comment_number = $args['per_page'] * ($args['page'] - 1) + 1; } else { $comment_number++; } ?>