19, 'title' => esc_html__('Service Title','better-health'), 'sub-title' => '', 'image' => '', ); return $defaults; } public function __construct() { parent::__construct( 'better-health-service-widget', esc_html__('Better Health Service Widget', 'better-health'), array('description' => esc_html__('Better Health Service Section', 'better-health')) ); } 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'] ); $image = esc_url( $instance['image'] ); ?>

+
$catid, 'posts_per_page' => 2, 'ignore_sticky_posts' => true, 'post__not_in' => $sticky, 'order' => 'ASC' ); $home_services_section_query = new WP_Query( $home_services_section ); if ($home_services_section_query->have_posts()) { while ($home_services_section_query->have_posts()) { $home_services_section_query->the_post(); $icon = get_post_meta( get_the_ID(), 'better_health_icon', true ); $idvalue[] = get_the_ID(); ?>
$catid, 'posts_per_page' => 2, 'ignore_sticky_posts' => true, 'post__not_in' => $post_not , 'order' => 'ASC' ); $home_services_section_query = new WP_Query( $home_services_section ); if ($home_services_section_query->have_posts()) { while ($home_services_section_query->have_posts()) { $home_services_section_query->the_post(); $icon = get_post_meta( get_the_ID(), 'better_health_icon', true ); ?>
defaults() ); $catid = absint( $instance['cat_id'] ); $title = esc_attr( $instance['title'] ); $subtitle = esc_attr( $instance['sub-title'] ); $image = esc_url( $instance['image'] ); ?>




esc_html__('Select Category', 'better-health'), '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( $quality_dropown_cat ); ?>




'; endif; ?>