0, 'title' => esc_html__( 'WHAT OUR CLIENT SAYS', 'ample-construction' ), 'image' => '', 'sub-title' => '', ); return $defaults; } public function __construct() { parent::__construct( 'Construction-testimonials-widget', esc_html__( 'Construction Testimonials Widget', 'ample-construction' ), array( 'description' => esc_html__( 'Construction Testimonials Section', 'ample-construction' ) ) ); } public function form( $instance ) { $instance = wp_parse_args( (array ) $instance, $this->defaults() ); $catid = absint( $instance['cat_id'] ); $title = esc_attr( $instance['title'] ); $image = esc_url( $instance['image'] ); $subtitle = esc_html( $instance['sub-title'] ); ?>




esc_html__( 'Select Categories ', 'ample-construction' ), '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( $better_con_dropown_cat ); ?>



'; endif; ?>

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 ); $image = esc_url( $instance['image'] ); $subtitle = esc_html( $instance['sub-title'] ); $sticky = get_option( 'sticky_posts' ); $home_testimonials_section = array( 'ignore_sticky_posts' => true, 'post__not_in' => $sticky, 'cat' => $catid, 'posts_per_page' => - 1, 'order' => 'DESC' ); echo $args['before_widget']; ?>

$catid, 'posts_per_page' => 6, 'ignore_sticky_posts' => true, 'post__not_in' => $sticky, 'order' => 'ASC' ); } $home_testimonials_section_query = new WP_Query( $home_testimonials_section ); if ( $home_testimonials_section_query->have_posts() ) { while ( $home_testimonials_section_query->have_posts() ) { $home_testimonials_section_query->the_post(); ?>