'post', 'post_status' => 'publish' ]; $post_query = new \WP_Query( apply_filters( 'blog_postx_query_args_filter', $query_args ) ); if( $post_query->have_posts() ) : while( $post_query->have_posts() ) : $post_query->the_post(); endwhile; endif; } add_action( 'blog_postx_masonry_articles_hook', 'blog_postx_article_masonry' ); endif; if( ! function_exists( 'blog_postx_ticker_html' ) ) : /** * Ticker News * * @package Blog Postx Pro * @since 1.0.0 */ function blog_postx_ticker_html() { if( ! BPX\blog_postx_get_customizer_option( 'ticker_news_option' ) || is_paged() || ! is_home() || ! is_front_page() ) return; // post query variables $ticker_args = blog_postx_get_query_args( 'ticker_news' ); ?>

have_posts() ) return; if( in_array( $main_banner_layouts, [ 'three', 'four', 'five' ] ) ) : $trailing_post_query_args = blog_postx_get_query_args( 'main_banner_trailing' ); $trailing_post_query = new \WP_Query( apply_filters( 'blog_postx_query_args_filter', $trailing_post_query_args ) ); endif; ?>
have_posts() ) : $post_query->the_post(); $thumbnails[] = get_the_post_thumbnail_url(); ?>
'lazy' ] ); ?>
', '' ); echo ''; ?>
have_posts() ) : $total_posts = $trailing_post_query->post_count; $count = 1; while( $trailing_post_query->have_posts() ) : $trailing_post_query->the_post(); if( $main_banner_layouts === 'five' && $count === 1 ) echo '
'; if( $main_banner_layouts === 'five' && $count === 3 ) echo '
'; ?>
', '' ); if( $main_banner_trailing_post_elements_show_date ) blog_postx_posted_on( get_the_ID() ); ?>
'; if( $main_banner_layouts === 'five' && $count === $total_posts ) echo '
'; $count++; endwhile; endif; ?>
absint( $category_collection_number ), 'exclude' => ( ! empty( $category_to_exclude ) ) ? array_column( $category_to_exclude, 'value' ) : [], 'include' => ( ! empty( $category_to_include ) ) ? array_column( $category_to_include, 'value' ) : [], 'orderby' => $category_collection_sort[1], 'order' => $category_collection_sort[0] ]; $get_all_categories = get_categories( $category_args ); $is_layout_three = ( $category_collection_layout === 'three' ); ?>
$cat_value ) : if( ! $is_layout_three ) : $category_query_args = [ 'cat' => absint( $cat_value->term_id ), 'meta_query' => [ [ 'key' => '_thumbnail_id', 'compare' => 'EXISTS' ] ], 'ignore_stick_posts' => true ]; $category_query = new WP_Query( apply_filters( 'blog_postx_query_args_filter', $category_query_args ) ); if( $category_query->have_posts() ) : $thumbnail_id = ( $category_query->posts[0]->ID != null ) ? $category_query->posts[0]->ID : ''; else: $thumbnail_id = ''; endif; endif; $catCountClass = 'category-count cat-' . esc_attr( $cat_value->term_id ); ?>
have_posts() ) return; ?> absint( $no_of_cats_to_show ), 'include' => ( ! empty( $categories_to_include ) ) ? array_column( $categories_to_include, 'value' ) : [], 'orderby' => $exploded_orderby[1], 'order' => $exploded_orderby[0] ]); $sectionClass[] = 'blog-postx-web-stories'; if( $no_of_cats_to_show ) $sectionClass[] = 'column--' . blog_postx_convert_number_to_numeric_string( $no_of_cats_to_show ); $sectionClass[] = 'hover--' . $image_hover; $page = get_pages([ 'meta_key' => '_wp_page_template', 'meta_value' => 'web-stories.php', 'number' => 1 ]); $archive_link = '#'; if( ! empty( $page ) ) $archive_link = get_permalink( $page[ 0 ]->ID ); ?>
$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; ?>
'lazy' ] ) ); ?>
term_id ) ) ,'" class="story-count">', esc_html( $category_count ), '', esc_html__( ' Stories', 'blog-postx' ), ''; ?>

', esc_html( $preview_title ) ,'

'; ?>
'; endfor; endif; ?>