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( 'blog99_page_template_parts_content' ); is added * if is_page is false - do_action( 'blog99_template_parts_content' ); is added. * @since 1.0.0 * @return void */ public function loop_markup( $is_page = false ) { ?>
blog99_related_post(); } //is comment part $this->template_parts_comments(); else: if ( true == $is_page ) { do_action( 'blog99_page_template_parts_content' ); } else { do_action( 'blog99_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' => get_theme_mod('blog99_related_number_of_post',4) ); $related_cats_post = new WP_Query( $query_args ); //related title $blog99_relate_header_title = get_theme_mod('blog99_related_post_header_title','RELATED ARTICLES'); ?>
have_posts()): while($related_cats_post->have_posts()): $related_cats_post->the_post(); ?>
'; } } /** * Add closing wrapper div for 'blog99-row' after Blog99 template part. * * @since 1.0.0 * @return void */ public function blog99_templat_part_wrap_close() { if ( is_archive() || is_search() || is_home() ) { echo ''; } } } /** * Initialize class object with 'get_instance()' method */ Blog99_Loop::get_instance(); endif;