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; ?>
term_id); endforeach; endif; $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(); ?>
', '' ); ?>
'; } } /** * 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;