loop_markup( true ); } /** * Template part loop * * @param boolean $is_page Loop outputs different content action for content page and default content. * if is_page is set to true - do_action( 'buzznews_page_template_parts_content' ); is added * if is_page is false - do_action( 'buzznews_template_parts_content' ); is added. * @since 1.0.0 * @return void */ public function loop_markup( $is_page = false ) { ?>
buzznews_related_post(); } //is comment part $this->template_parts_comments(); else: if ( true == $is_page ) { do_action( 'buzznews_page_template_parts_content' ); } else { do_action( 'buzznews_template_parts_content' ); } endif; endwhile; // Infinite Scrolling if( get_theme_mod('buzznews_infinite_scrolling') ){ echo '
'; } do_action( 'buzznews_template_parts_content_bottom' ); else : do_action( 'buzznews_template_parts_content_none' ); endif; ?>
term_id ); endforeach; endif; // Query Args $current_post_type = get_post_type( $post_id ); $query_args = array( 'category__in' => $cat_ids, 'post_type' => $current_post_type, 'post_not_in' => array( $post_id ), 'posts_per_page' => '6' ); $related_cats_post = new WP_Query( $query_args ); ?>
have_posts() ): while( $related_cats_post->have_posts() ): $related_cats_post->the_post(); ?>
' ); if( has_post_thumbnail() ){ the_post_thumbnail('buzznews-postlist'); }else{ echo sprintf( '%s',BUZZNEWS_THEME_IMG.'grid-thumbnail.jpg',get_the_title() ); } echo sprintf( '
' ); // Post format icons buzznews_post_format_icon(); ?>
', '' ); ?>
'; } } /** * Add closing wrapper div for 'buzznews-row' after BuzzNews template part. * * @since 1.0.0 * @return void */ public function buzznews_templat_part_wrap_close() { if ( is_archive() || is_search() || is_home() ) { echo ''; } } } /** * Initialize class object with 'get_instance()' method */ BuzzNews_Loop::get_instance(); endif;