-1, 'title' => esc_html__('Recent Posts','nexas'), 'sub_title' => esc_html__('Read Our Recent Updates','nexas'), 'read_more' => esc_html__('Read More','nexas'), ); return $defaults; } public function __construct() { parent::__construct( 'nexas-recent-post-widget', esc_html__( 'Nexas Recent Post Widget', 'nexas' ), array( 'description' => esc_html__( 'Nexas Recent Post Section', 'nexas' ) ) ); } public function widget( $args, $instance ) { if ( !empty( $instance ) ) { $instance = wp_parse_args( (array ) $instance, $this->defaults() ); echo $args['before_widget']; $catid = absint( $instance['cat_id'] ); $title = apply_filters('widget_title', !empty($instance['title']) ? esc_html( $instance['title']): '', $instance, $this->id_base); $subtitle = esc_html( $instance['sub_title'] ); $read_more = esc_html( $instance['read_more'] ); ?>


true, 'post__not_in' => $sticky, 'cat' => $catid, 'posts_per_page' => 3, 'order' => 'DESC' ); } else { $home_recent_post_section = array( 'ignore_sticky_posts' => true, 'post__not_in' => $sticky, 'post_type' => 'post', 'posts_per_page' => 3, 'order' => 'DESC' ); } $home_recent_post_section_query = new WP_Query($home_recent_post_section); if ( $home_recent_post_section_query->have_posts() ) { while ($home_recent_post_section_query->have_posts()) { $home_recent_post_section_query->the_post(); ?>
" data-wow-delay="s">

defaults() ); $catid = absint( $instance['cat_id'] ); $title = esc_attr( $instance['title'] ); $subtitle = esc_attr( $instance['sub_title'] ); $read_more = esc_attr( $instance['read_more'] ); ?>




esc_html__('From Recent Posts', 'nexas'), 'orderby' => 'name', 'order' => 'asc', 'show_count' => 1, 'hide_empty' => 1, 'echo' => 1, 'selected' => $catid, 'hierarchical' => 1, 'name' => esc_attr( $this->get_field_name('cat_id') ), 'id' => esc_attr( $this->get_field_name('cat_id') ), 'class' => 'widefat', 'taxonomy' => 'category', 'hide_if_empty' => false, ); wp_dropdown_categories( $nexas_con_dropown_cat ); ?>