Seu carrinho

Nenhum produto no carrinho.

0 ) ? $instance['item_vertical'] : 0; $style = $feature_html = ''; if ( $instance['style'] != '' ) { $style = $instance['style']; } $query_args = array( 'post_type' => 'post', 'posts_per_page' => $number_posts, 'order' => ( 'asc' == $instance['order'] ) ? 'asc' : 'desc', 'ignore_sticky_posts' => true ); if ( $instance['cat_id'] && $instance['cat_id'] != 'all' ) { $query_args['cat'] = $instance['cat_id']; } switch ( $instance['orderby'] ) { case 'recent' : $query_args['orderby'] = 'post_date'; break; case 'title' : $query_args['orderby'] = 'post_title'; break; case 'popular' : $query_args['orderby'] = 'comment_count'; break; default : //random $query_args['orderby'] = 'rand'; } $posts_display = new WP_Query( $query_args ); $box_class = $items_vertical < $number_posts ? ' has-horizontal' : ''; $box_class .= $items_vertical > 0 ? ' has-vertical' : ''; $feature_post = ( ! empty( $instance['display_feature'] ) && $instance['display_feature'] == 'yes' ) ? $instance['display_feature'] : false; if ( count( $posts_display->posts ) < $number_posts ) { $number_posts = count( $posts_display->posts ); } if ( $posts_display->have_posts() ) { if ( $instance['title'] ) { echo ent2ncr( $args['before_title'] . $instance['title'] . $args['after_title'] ); } $index = 1; $inner_class = ''; if ( $feature_post ) { $index = 0; $number_posts = $number_posts - 1; $inner_class = ' has-feature'; } echo '
'; echo '
'; while ( $posts_display->have_posts() ) { $posts_display->the_post(); $class = 'item-post'; if ( $index == 0 ) { $feature_html .= '
'; $feature_html .= '
'; if ( has_post_thumbnail() ) { $feature_html .= '
'; $feature_html .= get_the_post_thumbnail( get_the_ID(), 'full' ); $feature_html .= '
'; } $feature_html .= '
'; $feature_html .= '
' . get_the_date( get_option( 'date_format' ) ) . '
'; $feature_html .= '
' . esc_attr( get_the_title() ) . '
'; if ( $instance['show_description'] && $instance['show_description'] <> 'no' ) { $feature_html .= '
' . thim_excerpt( '13' ) . '
'; } $feature_html .= '' . esc_html__( 'Read More', 'eduma' ) . ''; $feature_html .= '
'; $feature_html .= '
'; $feature_html .= '
'; } else { if ( $index == 1 && ( $items_vertical < $number_posts ) ) { //Open div grid-horizontal echo '
'; } if ( ( ( $index - 1 == $number_posts - $items_vertical ) && $items_vertical > 0 ) || ( $items_vertical >= $number_posts && $index == 1 ) ) { //Open div grid-vertical echo '
'; } ?>
> '; if ( ! empty( $instance['img_w'] ) && ! empty( $instance['img_h'] ) ) { echo thim_get_feature_image( get_post_thumbnail_id(), 'full', $instance['img_w'], $instance['img_h'] ); } else { echo thim_get_feature_image( get_post_thumbnail_id(), 'full' ); } echo '
'; } echo '
'; echo '
' . get_the_date( get_option( 'date_format' ) ) . '
'; echo '
' . esc_attr( get_the_title() ) . '
'; if ( $instance['show_description'] && $instance['show_description'] <> 'no' ) { echo '
' . thim_excerpt( '13' ) . '
'; } echo '' . esc_html__( 'Read More', 'eduma' ) . ''; echo '
'; ?>
'; } } $index ++; } echo '
'; //Link All Posts if ( $instance['link'] <> '' ) { echo ''; } echo ent2ncr( $feature_html ); echo '
'; } wp_reset_postdata();