true ]); ?>

$cat_value ) : $category_query_args = [ 'cat' => absint( $cat_value->term_id ), 'meta_query' => [ [ 'key' => '_thumbnail_id', 'compare' => 'EXISTS' ] ], 'ignore_stick_posts' => true, 'fields' => 'ids', 'no_found_rows' => true ]; $category_query = new WP_Query( apply_filters( 'blog_postx_query_args_filter', $category_query_args ) ); $preview_title = ''; if( $category_query->have_posts() ) : $first_post = $category_query->posts[0]; $thumbnail_id = ( $first_post != null ) ? $first_post : ''; $preview_title = get_the_title( $first_post ); else: $thumbnail_id = ''; endif; $category_count = $cat_value->count; ?>
'; if( $thumbnail_id ) echo wp_kses_post( get_the_post_thumbnail( $thumbnail_id, $image_size, [ 'loading' => 'lazy' ] ) ); echo ''; echo '', esc_html( $cat_value->name ), ''; if( $show_preview_count ) echo '', esc_html( $category_count ), '', esc_html__( ' Stories', 'blog-postx' ), ''; if( $preview_title && $show_preview_title ) echo '

', esc_html( $preview_title ) ,'

'; echo '
'; if( $category_count ) : for( $i = 0; $i < $category_count; $i++ ) : echo ''; endfor; endif; echo '
'; ?>