'', 'title' => esc_html__( 'Our Team', 'business-uncode' ), ); return $defaults; } public function __construct() { parent::__construct( 'business-uncode-team-widget', esc_html__( 'BU: Team Widget', 'business-uncode' ), array( 'description' => esc_html__( 'Construction Team Section', 'business-uncode' ) ) ); } public function form( $instance ) { $instance = wp_parse_args( (array ) $instance, $this->defaults() ); $themesdivine_page_items = $instance['themesdivine_page_items']; $title = esc_attr( $instance['title'] ); ?>



get_field_id( 'themesdivine_page_items') .$total_repeater.'page_id'; $repeater_name = $this->get_field_name( 'themesdivine_page_items' ).'['.$total_repeater.']['.'page_id'.']'; ?>

get_field_id( 'themesdivine_page_items') .$structure_repeater_depth.'page_id'; $repeater_name = $this->get_field_name( 'themesdivine_page_items' ).'['.$structure_repeater_depth.']['.'page_id'.']'; ?> '; $add_field = __('Add Item', 'business-uncode'); echo ''.$add_field.'
'; ?>

0 && is_array($themesdivine_page_items) ){ foreach ($themesdivine_page_items as $key=>$about ){ $page_ids[$key]['page_id'] = absint( $about['page_id'] ); } } } $instance['themesdivine_page_items'] = $page_ids; $instance['title'] = sanitize_text_field( $new_instance['title'] ); return $instance; } public function widget( $args, $instance ) { if ( ! empty( $instance ) ) { $instance = wp_parse_args( (array ) $instance, $this->defaults() ); $themesdivine_page_items = $instance['themesdivine_page_items']; $title = apply_filters( 'widget_title', ! empty( $instance['title'] ) ? esc_html( $instance['title'] ) : '', $instance, $this->id_base ); echo $args['before_widget']; ?>

0 && is_array($themesdivine_page_items) ){ foreach ( $themesdivine_page_items as $our_team ){ if( isset( $our_team['page_id'] ) && !empty( $our_team['page_id'] ) ){ $post_in[] = $our_team['page_id']; } } } if( !empty( $post_in )) : $our_team_page_args = array( 'post__in' => $post_in, 'orderby' => 'post__in', 'posts_per_page' => count( $post_in ), 'post_type' => 'page', 'no_found_rows' => true, 'post_status' => 'publish' ); $our_team_query = new WP_Query( $our_team_page_args ); /*The Loop*/ if ( $our_team_query->have_posts() ): $i = 1; while ( $our_team_query->have_posts() ):$our_team_query->the_post(); ?>