acommerce_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( 'acommerce_page_template_parts_content' ); is added * if is_page is false - do_action( 'acommerce_template_parts_content' ); is added. * @since 1.0.0 * @return void */ public function acommerce_loop_markup( $is_page = false ) { ?>
acommerce_related_post(); } //is comment part $this->acommerce_template_parts_comments(); else: if ( true == $is_page ) { do_action( 'acommerce_page_template_parts_content' ); } else { do_action( 'acommerce_template_parts_content' ); } endif; ?>
term_id ); endforeach; endif; /** * related post query section */ $terms = get_the_terms( get_the_ID(), 'category' ); $term_list = wp_list_pluck( $terms, 'slug' ); $related_args = array( 'post_type' => 'post', 'posts_per_page' => $acommerce_related_post_count, 'post_status' => 'publish', 'post__not_in' => array( get_the_ID() ), 'orderby' => 'rand', 'tax_query' => array( array( 'taxonomy' => 'category', 'field' => 'slug', 'terms' => $term_list ) ) ); //related cats post $acommerce_related_cats_post = new WP_Query( $related_args ); if($acommerce_related_cats_post->have_posts()): ?>

have_posts()): $acommerce_related_cats_post->the_post(); ?>

'; } } /** * Add closing wrapper div for 'acommerce-row' after aCommerce template part. * * @since 1.0.0 * @return void */ public function acommerce_templat_part_wrap_close() { if ( is_archive() || is_search() || is_home() ) { echo ''; } } } /** * Initialize class object with 'get_instance()' method */ aCommerce_Loop::get_instance(); endif;