ID, 'blog_elite_page_layout', true ); } /*Fetch from customizer*/ if(empty($page_layout)){ $page_layout = blog_elite_get_option('global_sidebar_layout'); } return $page_layout; } endif; if ( ! function_exists( 'blog_elite_get_all_image_sizes' ) ) : /** * Returns all image sizes available. * * @since 1.0.0 * * @param bool $for_choice True/False to construct the output as key and value choice * @return array Image Size Array. */ function blog_elite_get_all_image_sizes( $for_choice = false ) { global $_wp_additional_image_sizes; $sizes = array(); if( true == $for_choice ){ $sizes['no-image'] = __( 'No Image', 'blog-elite' ); } foreach ( get_intermediate_image_sizes() as $_size ) { if ( in_array( $_size, array('thumbnail', 'medium', 'large') ) ) { $width = get_option( "{$_size}_size_w" ); $height = get_option( "{$_size}_size_h" ); if( true == $for_choice ){ $sizes[$_size] = ucfirst($_size) . ' (' . $width . 'x' . $height . ')'; }else{ $sizes[ $_size ]['width'] = $width; $sizes[ $_size ]['height'] = $height; $sizes[ $_size ]['crop'] = (bool) get_option( "{$_size}_crop" ); } } elseif ( isset( $_wp_additional_image_sizes[ $_size ] ) ) { $width = $_wp_additional_image_sizes[ $_size ]['width']; $height = $_wp_additional_image_sizes[ $_size ]['height']; if( true == $for_choice ){ $sizes[$_size] = ucfirst($_size) . ' (' . $width . 'x' . $height . ')'; }else{ $sizes[ $_size ] = array( 'width' => $width, 'height' => $height, 'crop' => $_wp_additional_image_sizes[ $_size ]['crop'], ); } } } if( true == $for_choice ){ $sizes['full'] = __( 'Full Image', 'blog-elite' ); } return $sizes; } endif; if ( ! function_exists( 'blog_elite_get_header_layouts' ) ) : /** * Returns header layout options. * * @since 1.0.0 * * @return array Options array. */ function blog_elite_get_header_layouts() { $options = apply_filters( 'blog_elite_header_layouts', array( 'header_style_1' => array( 'url' => get_template_directory_uri().'/assets/images/header1.png', 'label' => esc_html__( 'Header Style 1', 'blog-elite' ), ), 'header_style_2' => array( 'url' => get_template_directory_uri().'/assets/images/header2.png', 'label' => esc_html__( 'Header Style 2', 'blog-elite' ), ), ) ); return $options; } endif; if ( ! function_exists( 'blog_elite_get_footer_layouts' ) ) : /** * Returns footer layout options. * * @since 1.0.0 * * @return array Options array. */ function blog_elite_get_footer_layouts() { $options = apply_filters( 'blog_elite_footer_layouts', array( 'footer_layout_1' => array( 'url' => get_template_directory_uri().'/assets/images/footer-col-4.png', 'label' => esc_html__( 'Four Columns', 'blog-elite' ), ), 'footer_layout_2' => array( 'url' => get_template_directory_uri().'/assets/images/footer-col-3.png', 'label' => esc_html__( 'Three Columns', 'blog-elite' ), ), 'footer_layout_3' => array( 'url' => get_template_directory_uri().'/assets/images/footer-col-2.png', 'label' => esc_html__( 'Two Columns', 'blog-elite' ), ), ) ); return $options; } endif; if ( ! function_exists( 'blog_elite_get_general_layouts' ) ) : /** * Returns general layout options. * * @since 1.0.0 * * @return array Options array. */ function blog_elite_get_general_layouts() { $options = apply_filters( 'blog_elite_general_layouts', array( 'left-sidebar' => array( 'url' => get_template_directory_uri().'/assets/images/left_sidebar.png', 'label' => esc_html__( 'Left Sidebar', 'blog-elite' ), ), 'right-sidebar' => array( 'url' => get_template_directory_uri().'/assets/images/right_sidebar.png', 'label' => esc_html__( 'Right Sidebar', 'blog-elite' ), ), 'no-sidebar' => array( 'url' => get_template_directory_uri().'/assets/images/no_sidebar.png', 'label' => esc_html__( 'No Sidebar', 'blog-elite' ), ), 'no-sidebar-boxed' => array( 'url' => get_template_directory_uri().'/assets/images/no-sidebar-boxed.png', 'label' => esc_html__( 'No Sidebar - Boxed', 'blog-elite' ), ) ) ); return $options; } endif; if ( ! function_exists( 'blog_elite_get_archive_layouts' ) ) : /** * Returns archive layout options. * * @since 1.0.0 * * @return array Options array. */ function blog_elite_get_archive_layouts() { $options = apply_filters( 'blog_elite_archive_layouts', array( 'archive_style_1' => array( 'url' => get_template_directory_uri().'/assets/images/single_column.png', 'label' => esc_html__( 'Single Column', 'blog-elite' ), ), 'archive_style_2' => array( 'url' => get_template_directory_uri().'/assets/images/full_column.png', 'label' => esc_html__( 'Full Column', 'blog-elite' ), ), ) ); return $options; } endif; if ( ! function_exists( 'blog_elite_header_styles' ) ) : /** * Display classes and inline style to the Blog Elite header. * * @uses get_header_image() * @since 1.0.0 */ function blog_elite_header_styles() { $is_header_image = get_header_image(); $header_bg_image = ''; if ( $is_header_image ) { $header_bg_image = 'url(' . esc_url( $is_header_image ) . ')'; } $classes = ''; $final_styles = $styles = array(); if ( '' !== $header_bg_image ) { $classes = 'be-site-brand-wrap'; $styles['background-image'] = $header_bg_image; } $classes = apply_filters( 'blog_elite_header_classes', $classes ); $styles = apply_filters( 'blog_elite_header_styles', $styles ); foreach ( $styles as $style => $value ) { $final_styles[] = esc_attr( $style . ': ' . $value . '; ' ); } if(!empty($final_styles) || !empty($classes)){ echo 'class="'.esc_attr($classes).'" style="'.join('', $final_styles).'"'; } } endif; if ( ! function_exists( 'blog_elite_top_bar' ) ) : /** * Display top bar * * @since 1.0.0 * */ function blog_elite_top_bar() { $container_class = ''; $top_bar_layout = blog_elite_get_option('top_bar_layout'); if('boxed' == $top_bar_layout){ $container_class = 'saga-container'; } ?>
'post', 'post_status' => 'publish', 'posts_per_page' => $no_of_trending_posts, 'orderby' => $trending_orderby, 'order' => $trending_order, 'no_found_rows' => 1, 'ignore_sticky_posts' => 1, ); if(!empty($trending_post_cat)){ $post_args['tax_query'][] = array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => absint($trending_post_cat), ); } $trending_posts = new WP_Query($post_args); if($trending_posts->have_posts()){ ?>
'social-menu', 'container_class' => 'social-navigation', 'link_before' => '', 'link_after' => '', 'fallback_cb' => false, 'depth' => 1, 'menu_class' => false ) ); } endif; if ( ! function_exists( 'blog_elite_primary_menu' ) ) : /** * Display primary menu. * * @since 1.0.0 * */ function blog_elite_primary_menu() { ?>

the_title_attribute( array( 'echo' => false, ) ), ) ); ?>
'', ) ); ?>
'publish', 'post_type' => 'post', 'paged' => $paged, ); $latest_posts = new WP_Query($posts_args); if($latest_posts->have_posts()): set_query_var('archive_style', $front_blog_style); ?>
have_posts()):$latest_posts->the_post(); get_template_part('template-parts/content', get_post_type()); endwhile; $front_page_pagination_type = blog_elite_get_option('front_page_pagination_type'); if('numeric' == $front_page_pagination_type){ $big = 999999999; $links = paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, $paged ), 'total' => $latest_posts->max_num_pages, 'prev_text' => _x( 'Previous', 'previous set of posts', 'blog-elite' ), 'next_text' => _x( 'Next', 'next set of posts', 'blog-elite' ), ) ); if ( $links ) { $pagination_align = blog_elite_get_option( 'home_numeric_pagination_align' ); ?>