'post', 'post_status' => 'publish', 'posts_per_page' => absint( $main_banner_no_of_posts_to_show ), 'order' => $post_order[1], 'order_by' => $post_order[1], '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( $post_query_args ); if( $post_query->have_posts() ) : while( $post_query->have_posts() ) : $post_query->the_post(); ?>
', '' ); if( $show_author ) blogig_posted_by( 'banner' ); ?>
'; break; default: $output = ''; } return $output; } endif; if( ! function_exists( 'blogig_convert_number_to_numeric_string' )) : /** * Function to convert int parameter to numeric string * * @return string */ function blogig_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; default: return "one"; } } endif; if( ! function_exists( 'blogig_post_read_time' ) ) : /** * Function derives the read time * @return float */ function blogig_post_read_time( $string = '' ) { $read_time = 0; if( empty( $string ) ) { return 0 . esc_html__( ' min', 'blogig' ); } else { $read_time = apply_filters( 'blogig_content_read_time', round( str_word_count( wp_strip_all_tags( $string ) ) / 100 ), 2 ); if( $read_time == 0 ) { return 1 . esc_html__( ' min', 'blogig' ); } else { return $read_time . esc_html__( ' mins', 'blogig' ); } } } endif; if( ! function_exists( 'blogig_get_post_categories' ) ) : /** * Function contains post categories html * @return float */ function blogig_get_post_categories( $post_id, $number = 1 ) { $n_categories = wp_get_post_categories($post_id, array( 'number' => absint( $number ) )); echo ''; } endif; if( ! function_exists( 'blogig_loader_html' ) ) : /** * Preloader html * * @package Blogig * @since 1.0.0 */ function blogig_loader_html() { if( ! BD\blogig_get_customizer_option( 'preloader_option' ) ) return; $elementClass = 'blogig_loading_box'; $elementClass .= ' display-preloader--every-load'; ?>
' .wp_kses_post( paginate_links( array( 'prev_text' => '', 'next_text' => '', 'type' => 'list' ) ) ). ''; } } add_action( 'blogig_pagination_link_hook', 'blogig_pagination_fnc' ); endif; if( ! function_exists( 'blogig_scroll_to_top_html' ) ) : /** * Scroll to top fnc * * @package Blogig * @since 1.0.0 */ function blogig_scroll_to_top_html() { if( ! BD\blogig_get_customizer_option('blogig_scroll_to_top_option') ) return; $stt_text = BD\blogig_get_customizer_option( 'stt_text' ); $stt_icon = BD\blogig_get_customizer_option( 'stt_icon' ); $stt_alignment = BD\blogig_get_customizer_option( 'stt_alignment' ); $scroll_to_top_mobile_option = BD\blogig_get_customizer_option( 'scroll_to_top_mobile_option' ); $classes = 'align--' . $stt_alignment; if( ! $scroll_to_top_mobile_option ) $classes .= ' hide-on-mobile'; ?>
'. esc_html( $stt_text ) .''; } if( $stt_icon['type'] == 'icon' ) { if( $stt_icon['value'] != 'fas fa-ban' ) : echo ''; endif; } else { if( $stt_icon['type'] != 'none' )echo ''. wp_get_attachment_image( $stt_icon['value'], 'full' ) .''; } ?>
'div', 'show_browse' => false, ); breadcrumb_trail( $breadcrumb_args ); } add_action( 'blogig_breadcrumb_trail_hook', 'blogig_breadcrumb_trail' ); endif; if( ! function_exists( 'blogig_breadcrumb_html' ) ) : /** * Theme breadcrumb * * @package Blogig * @since 1.0.0 */ function blogig_breadcrumb_html() { $site_breadcrumb_option = BD\blogig_get_customizer_option( 'site_breadcrumb_option' ); if ( ! $site_breadcrumb_option ) return; if ( is_front_page() || is_home() ) return; $site_breadcrumb_type = BD\blogig_get_customizer_option( 'site_breadcrumb_type' ); ?>
'; break; case 'svg' : echo ''; break; endswitch; } endif;