'; endif; } add_action( 'blogzee_header_after_hook', 'blogzee_progress_bar', 10 ); endif; if( ! function_exists( 'blogzee_ticker_html' ) ) : /** * Ticker News * * @package Blogzee Pro * @since 1.0.0 */ function blogzee_ticker_html() { if( ! BZ\blogzee_get_customizer_option( 'ticker_news_option' ) || is_paged() || ! is_home() || ! is_front_page() ) return; // post query variables $ticker_news_categories = BZ\blogzee_get_customizer_option( 'ticker_news_categories' ); $ticker_news_posts_to_include = BZ\blogzee_get_customizer_option( 'ticker_news_posts_to_include' ); $ticker_news_post_order = BZ\blogzee_get_customizer_option( 'ticker_news_post_order' ); $ticker_news_no_of_posts_to_show = BZ\blogzee_get_customizer_option( 'ticker_news_no_of_posts_to_show' ); $ticker_news_hide_post_with_no_featured_image = BZ\blogzee_get_customizer_option( 'ticker_news_hide_post_with_no_featured_image' ); $post_categories_id_args = ( ! empty( $ticker_news_categories ) ) ? implode( ",", array_column( $ticker_news_categories, 'value' ) ) : ''; $post_to_include_id_args = ( ! empty( $ticker_news_posts_to_include ) ) ? array_column( $ticker_news_posts_to_include, 'value' ) : ''; // Query $post_order = explode( '-', $ticker_news_post_order ); $ticker_args = [ 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => absint( $ticker_news_no_of_posts_to_show ), 'order' => $post_order[1], 'order_by' => $post_order[0], 'ignore_sticky_posts' => true ]; if( isset( $ticker_news_categories ) ) $ticker_args['cat'] = $post_categories_id_args; if( isset( $ticker_news_posts_to_include ) ) $ticker_args['post__in'] = $post_to_include_id_args; if( $ticker_news_hide_post_with_no_featured_image ) : $ticker_args['meta_query'] = [ [ 'key' => '_thumbnail_id', 'compare' => 'EXISTS' ] ]; endif; ?>

'post', 'post_status' => 'publish', 'posts_per_page' => absint( $main_banner_no_of_posts_to_show ), 'order' => $post_order[1], 'order_by' => $post_order[0], 'ignore_sticky_posts' => true ]; if( isset( $main_banner_post_categories ) ) $post_query_args['cat'] = $post_categories_id_args; if( isset( $main_banner_posts_to_include ) ) $post_query_args['post__in'] = $post_to_include_id_args; if( $hide_posts_with_no_featured_image ) : $post_query_args['meta_query'] = [ [ 'key' => '_thumbnail_id', 'compare' => 'EXISTS' ] ]; endif; $post_query = new \WP_Query( apply_filters( 'blogzee_query_args_filter', $post_query_args ) ); if( ! $post_query->have_posts() ) return; if( in_array( $main_banner_layouts, [ 'three', 'four' ] ) ) : /* Trailing Posts Variables and Query */ $main_banner_trailing_post_order = BZ\blogzee_get_customizer_option( 'main_banner_trailing_post_order' ); $main_banner_trailing_slider_categories = BZ\blogzee_get_customizer_option( 'main_banner_trailing_slider_categories' ); $main_banner_trailing_slider_posts_to_include = BZ\blogzee_get_customizer_option( 'main_banner_trailing_slider_posts_to_include' ); $main_banner_trailing_no_of_posts_to_show = BZ\blogzee_get_customizer_option( 'main_banner_trailing_no_of_posts_to_show' ); $main_banner_trailing_hide_post_with_no_featured_image = BZ\blogzee_get_customizer_option( 'main_banner_trailing_hide_post_with_no_featured_image' ); $trailing_post_order = explode( '-', $main_banner_trailing_post_order ); $trailing_post_categories_id_args = ( ! empty( $main_banner_trailing_slider_categories ) ) ? implode( ",", array_column( $main_banner_trailing_slider_categories, 'value' ) ) : ''; $trailing_post_to_include_id_args = ( ! empty( $main_banner_trailing_slider_posts_to_include ) ) ? array_column( $main_banner_trailing_slider_posts_to_include, 'value' ) : ''; $trailing_post_query_args = [ 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => absint( $main_banner_trailing_no_of_posts_to_show ), 'order' => $trailing_post_order[1], 'order_by' => $trailing_post_order[0], 'ignore_sticky_posts' => true ]; if( isset( $main_banner_trailing_slider_categories ) ) $trailing_post_query_args['cat'] = $trailing_post_categories_id_args; if( isset( $main_banner_trailing_slider_posts_to_include ) ) $trailing_post_query_args['post__in'] = $trailing_post_to_include_id_args; if( $main_banner_trailing_hide_post_with_no_featured_image ) : $trailing_post_query_args['meta_query'] = [ [ 'key' => '_thumbnail_id', 'compare' => 'EXISTS' ] ]; endif; $trailing_post_query = new \WP_Query( apply_filters( 'blogzee_query_args_filter', $trailing_post_query_args ) ); endif; ?>
have_posts() ) : $post_query->the_post(); $thumbnails[] = get_the_post_thumbnail_url(); ?>
', '' ); echo '
'. esc_html( wp_trim_words( get_the_excerpt(), 15 ) ) .'
'; echo ''; ?>
have_posts() ) : while( $trailing_post_query->have_posts() ) : $trailing_post_query->the_post(); ?>
', '' ); blogzee_posted_on( get_the_ID(), 'banner' ); ?>
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 ); ?>
$cat_value ) : $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( 'blogzee_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; ?>
'post', 'post_status' => 'publish', 'posts_per_page' => absint( $carousel_no_of_posts_to_show ), 'order' => $post_order[1], 'order_by' => $post_order[0], 'ignore_sticky_posts' => true ]; if( isset( $carousel_post_categories ) ) $post_query_args['cat'] = $post_categories_id_args; if( isset( $carousel_posts_to_include ) ) $post_query_args['post__in'] = $post_to_include_id_args; if( $hide_posts_with_no_featured_image ) : $post_query_args['meta_query'] = [ [ 'key' => '_thumbnail_id', 'compare' => 'EXISTS' ] ]; endif; $post_query = new \WP_Query( apply_filters( 'blogzee_query_args_filter', $post_query_args ) ); if( ! $post_query->have_posts() ) return; ?> [ 'type' => 'icon', 'value' => 'fa-solid fa-arrow-left-long' ], 'next' => [ 'type' => 'icon', 'value' => 'fa-solid fa-arrow-right-long' ] ]; foreach( $pagination_array as $pagination_key => $pagination ) : $paginationClass = 'custom-button-' . $pagination_key; $paginationClass .= ' swiper-arrow'; ?>
'; else: echo ''; endif; ?>
'; break; default: $output = ''; } return $output; } endif; if( ! function_exists( 'blogzee_convert_number_to_numeric_string' )) : /** * Function to convert int parameter to numeric string * * @return string */ function blogzee_convert_number_to_numeric_string( $int ) { switch( $int ){ case 2: return "two"; break; case 3: return "three"; break; case 4: return "four"; break; case 5: return "five"; break; case 6: return "six"; break; case 7: return "seven"; break; case 8: return "eight"; break; case 9: return "nine"; break; case 10: return "ten"; break; default: return "one"; } } endif; if( ! function_exists( 'blogzee_post_read_time' ) ) : /** * Function derives the read time * @return float */ function blogzee_post_read_time( $string = '' ) { $read_time = 0; if( empty( $string ) ) { return 0 . esc_html__( ' min', 'blogzee' ); } else { $read_time = apply_filters( 'blogzee_content_read_time', round( str_word_count( wp_strip_all_tags( $string ) ) / 100 ), 2 ); if( $read_time == 0 ) { return 1 . esc_html__( ' min', 'blogzee' ); } else { return $read_time . esc_html__( ' mins', 'blogzee' ); } } } endif; if( ! function_exists( 'blogzee_get_post_categories' ) ) : /** * Function contains post categories html * @return float */ function blogzee_get_post_categories( $post_id, $number = 1, $args = [] ) { $hide_on_mobile = ''; $n_categories = wp_get_post_categories($post_id, array( 'number' => absint( $number ) )); if( array_key_exists( 'hide_on_mobile', $args ) ) : $hide_on_mobile = ( ! $args['hide_on_mobile'] ) ? ' hide-on-mobile' : ''; endif; echo ''; } endif; if( ! function_exists( 'blogzee_loader_html' ) ) : /** * Preloader html * * @package Blogzee Pro * @since 1.0.0 */ function blogzee_loader_html() { if( ! BZ\blogzee_get_customizer_option( 'preloader_option' ) ) return; ?>
' .wp_kses_post( paginate_links( array( 'prev_text' => '', 'next_text' => '', 'type' => 'list' ) ) ). ''; } } add_action( 'blogzee_pagination_link_hook', 'blogzee_pagination_fnc' ); endif; if( ! function_exists( 'blogzee_scroll_to_top_html' ) ) : /** * Scroll to top fnc * * @package Blogzee Pro * @since 1.0.0 */ function blogzee_scroll_to_top_html() { $stt_text = BZ\blogzee_get_customizer_option( 'stt_text' ); $classes = 'blogzee-scroll-btn align--right display--fixed'; $show_scroll_to_top_on_mobile = BZ\blogzee_get_customizer_option( 'show_scroll_to_top_on_mobile' ); if( ! $show_scroll_to_top_on_mobile ) $classes .= ' hide-on-mobile'; ?>
'. esc_html( $stt_text ) .''; ?>
'div', 'show_browse' => false ); breadcrumb_trail( $breadcrumb_args ); } add_action( 'blogzee_breadcrumb_trail_hook', 'blogzee_breadcrumb_trail' ); endif; if( ! function_exists( 'blogzee_breadcrumb_html' ) ) : /** * Theme breadcrumb * * @package Blogzee Pro * @since 1.0.0 */ function blogzee_breadcrumb_html() { $site_breadcrumb_option = BZ\blogzee_get_customizer_option( 'site_breadcrumb_option' ); if ( ! $site_breadcrumb_option ) return; if ( is_front_page() || is_home() ) return; $site_breadcrumb_type = BZ\blogzee_get_customizer_option( 'site_breadcrumb_type' ); ?>
'; break; case 'svg' : echo ''; break; endswitch; } endif; if( ! function_exists( 'blogzee_button_html' ) ) : /** * View all html * * @package Blogzee Pro * @since 1.0.0 */ function blogzee_button_html( $args ) { if( ! $args['show_button'] ) return; $classes = isset( $args['classes'] ) ? 'blogzee-button post-link-button' . ' ' .$args['classes'] : 'post-button blogzee-button'; $link = isset( $args['link'] ) ? $args['link'] : get_the_permalink(); $text = isset( $args['text'] ) ? $args['text'] : apply_filters( 'blogzee_global_button_label_fitler', esc_html__( 'continue reading..', 'blogzee' ) ); $icon = isset( $args['icon'] ) ? $args['icon'] : ''; $text_html = sprintf( '%1$s', esc_html( $text ) ); $icon_html = ( $icon != '' ) ? sprintf( '', esc_attr( $icon ) ) : ''; echo apply_filters( 'blogzee_button_html', sprintf( '%3$s%4$s', esc_attr( $classes ), esc_url( $link ), wp_kses_post( $text_html ), wp_kses_post( $icon_html ) ) ); } add_action( 'blogzee_section_block_view_all_hook', 'blogzee_button_html', 10, 1 ); endif;