style="background:url()" >
|
"; the_posts_pagination( array( 'mid_size' => 2, 'prev_text' => __( '<', 'buzznews' ), 'next_text' => __( '>', 'buzznews' ), ) ); echo ''; $output = ob_get_clean(); echo apply_filters( 'buzznews_pagination_markup', wp_kses_post( $output ) ); // WPCS: XSS OK. } } add_action( 'buzznews_pagination', 'buzznews_number_pagination' ); /*************************************Sidebar****************************** */ /** * BuzzNews before the main content * * @since 1.0.0 * @param int $post_id get the post id * * @return string */ if ( ! function_exists( 'buzznews_before_main_wrapper_main_sec' ) ) { /** * BuzzNews Sidebar layout * * @since 1.0.0 * @return void */ function buzznews_before_main_wrapper_main_sec() { echo '
'; } } add_action( 'buzznews_before_mainsec', 'buzznews_before_main_wrapper_main_sec' ); /** * BuzzNews before the main content * * @since 1.0.0 * @param int $post_id get the post id * * @return string */ if ( ! function_exists( 'buzznews_before_main_wrapper_sec' ) ) { /** * BuzzNews Sidebar layout * * @since 1.0.0 * @return void */ function buzznews_before_main_wrapper_sec() { echo '
'; } } add_action( 'buzznews_after_mainsec', 'buzznews_before_main_wrapper_sec' ); /** * Sidebar functions * * @since 1.0.0 * @return string */ if( ! function_exists( 'buzznews_page_layout' ) ) { function buzznews_page_layout(){ /** * get the value form customizer * * @since 1.0.0 * @return string */ return esc_html( get_theme_mod( 'buzznews_post_sidebar_layout_settings','buzznews-right-sidebar' ) ); } } /** * Buzznews * author image ,link and name display *@since 1.0.0 */ if( ! function_exists('buzznews_meta_authorlink') ) { function buzznews_meta_authorlink(){ return '
'. buzznews_meta_author_image() .'
'; } } if( ! function_exists('buzznews_meta_author_image') ) { function buzznews_meta_author_image(){ return get_avatar( get_the_author_meta( 'ID' ), 25, null, null, array( 'class' => 'img-circle' ) ); } } /** * Buzznews get the category * * @since 1.0.0 */ if( ! function_exists( 'buzznews_get_post_categories' ) ) { /** * Get Post Category * * @return array * @since 1.0.0 */ function buzznews_get_post_categories(){ $all_categories = get_categories( ); //default value $categories['all'] = 'all'; foreach( $all_categories as $category ){ $categories[$category->term_id] = $category->name; } return $categories; } } /** * BuzzNews main slider options * * @since 1.0.0 * @param int $post_id get the post id * * @return string */ if ( ! function_exists( 'buzznews_main_slider_section' ) ) { /** * BuzzNews Main sldier section * * @since 1.0.0 * @return void */ function buzznews_main_slider_section() { /** * get the all customizer control data * * @since 1.0.0 */ $buzznews_homepage_slider = get_theme_mod('buzznews_slider_slider_section_enable',true); $buzznews_slider_tranding_enable = get_theme_mod('buzznews_slider_tranding_enable',true); $buzznews_slider_right_enable = get_theme_mod('buzznews_slider_right_enable',true); /** * Homepage Sldier Section * * @since 1.0.0 */ if( $buzznews_homepage_slider != true ): return; endif; //layout settings $buzznews_slider_class = 'col-lg-6 col-md-8 col-sm-12 col-12'; if( $buzznews_slider_tranding_enable == false || $buzznews_slider_right_enable == false ){ if( $buzznews_slider_tranding_enable == false && $buzznews_slider_right_enable == false ){ $buzznews_slider_class = 'col-lg-12 col-md-12 col-sm-12 col-12'; }else{ $buzznews_slider_class = 'col-lg-9 col-md-9 col-sm-12 col-12'; } }else{ $buzznews_slider_class = 'col-lg-6 col-md-8 col-sm-12 col-12'; } ?>
'.esc_html( $buzznews_slider_latest_title ).''; } ?>
'post','posts_per_page'=>$buzznews_count,'cat'=>$buzznews_category_post_id); $query = new WP_Query( $args ); while($query->have_posts()): $query->the_post(); ?>
'post','posts_per_page'=>$buzznews_slider_count,'cat'=>$buzznews_slider_category_post_id ); $q = new WP_Query( $args ); while($q->have_posts()): $q->the_post(); $post_list[] = $q->post; if( $count < 4 and has_post_thumbnail( $q->post ) ): if( $buzznews_post_is_exclusive ): $first_post[] = array_shift($post_list); elseif( has_post_thumbnail( $q->post ) ): $first_post[] = $q->post; endif; endif; $count++;//increment the file endwhile; // End of the loop. // wp_reset_postdata(); foreach ( $first_post as $post_item ) : ?>
ID) ){ echo get_the_post_thumbnail($post_item->ID, 'buzznews-main-slider'); }else{ echo sprintf( '%s',BUZZNEWS_THEME_IMG.'countdown.png',get_the_title() ); } ?>

ID ); ?>

ID ) ); get_buzznews_post_timedate( $post_item->ID ); ?>
ID,'buzznews-grid'); ?>
ID);//#post format ?>
ID);//#post format ?>
ID ) ); get_buzznews_post_timedate($post_item->ID); ?>
'post','posts_per_page'=>$buzznews_slider_right_count,'cat'=>$buzznews_slider_right_category_post_id); $query = new WP_Query( $args ); if( $query->have_posts() ): while( $query->have_posts() ): $query->the_post(); /** * check the post * @since 1.0.0 */ if($buzznews_post_count == 1){ ?>
', '' ); ?>
', '' ); ?>
'post','posts_per_page'=>$buzznews_slider_count,'cat'=>$buzznews_slider_category_post_id); $query = new WP_Query( $args ); while($query->have_posts()): $query->the_post(); ?>
',BUZZNEWS_THEME_IMG.'grid-thumbnail.jpg',get_the_title() ); } ?>
', '' ); ?>
publish; return $total; } } /** * BuzzNews category postlist * * @since 1.0.0 * * @return string */ if ( ! function_exists( 'buzznews_category_postlist_section' ) ) { /** * BuzzNews Main sldier section * * @since 1.0.0 * @return void */ function buzznews_category_postlist_section() { /** * get the all customizer control data * * @since 1.0.0 */ if( get_theme_mod('buzznews_frontpage_category_postlist_enable',false) != true ): return; endif; $categoryid = get_theme_mod('buzznews_frontpage_category_postlist_categoryid',buzznews_get_post_categories()); $numberofpost = get_theme_mod('buzznews_frontpage_category_postlist_numberofpost',6 ); ?>
'; } ?>
post_author ) ) { // Get author's display name $display_name = get_the_author_meta( 'display_name', $post->post_author ); // If display name is not available then use nickname as display name if ( empty( $display_name ) ) $display_name = get_the_author_meta( 'nickname', $post->post_author ); // Get author's biographical information or description $user_description = get_the_author_meta( 'user_description', $post->post_author ); // Get author's website URL $user_website = get_the_author_meta('url', $post->post_author); // Get link to the author archive page $user_posts = get_author_posts_url( get_the_author_meta( 'ID' , $post->post_author)); if ( ! empty( $display_name ) ) $author_details = '

' . esc_html( $display_name ). '

'; if ( ! empty( $user_description ) ) // Author avatar and bio $author_details .= '

' . get_avatar( get_the_author_meta('user_email') , 90 ) . nl2br( $user_description ). '

'; $author_details .= ''; } else { // if there is no author website then just close the paragraph $author_details .= '

'; } // Pass all this info to post content $content = $content . ''; } return $content; } // Add our function to the post content filter add_action( 'the_content', 'buzznews_author_info_box' );