esc_html__( 'Display single category widget section.', 'acommerce' ), ) // Args ); } /** * Widget Form Section */ public function form( $instance ) { $acommerce_defaults = array( 'acommerce_latest_news_sort_title' => '', 'acommerce_latest_news_title' => '', 'acommerce_post_category' => '', 'acommerce_number_of_post' => 3, 'acommerce_post_order' => 'DESC', 'acommerce_latest_news_style' => 'style_1', ); $instance = wp_parse_args( (array) $instance, $acommerce_defaults ); ?>

$this->get_field_name('acommerce_post_category'), 'selected' => $instance['acommerce_post_category'], 'show_option_all' => __('Show all posts','acommerce' ), 'class' => 'widefat' ) ); ?>

'post','posts_per_page'=>$acommerce_number_of_post,'cat'=>$acommerce_post_category); $acommerce_query = new WP_Query( $acommerce_args ); // Main Slider Section echo wp_kses_post( $before_widget ); ?>

have_posts()) { while($acommerce_query->have_posts()) { $acommerce_query->the_post(); ?>