'post', 'cat' => absint($feature_post_cat), 'posts_per_page' => 4, 'order' => 'DESC' ); } } else{ if( null != $feature_post_page) { foreach ( $feature_post_page as $feature_post_pages ){ if( 0 != $feature_post_pages['feature-page-ids'] ){ $feature_page_id[] = $feature_post_pages['feature-page-ids']; } } if( !empty($feature_page_id) ) { $bizcare_feature_arg = array( 'post_type' => 'page', 'post__in' => $feature_page_id, 'orderby' => 'post__in', 'order' => 'ASC' ); } } } if( !empty($bizcare_feature_arg) ){ $bizcare_feature_query = new WP_Query($bizcare_feature_arg); if( $bizcare_feature_query->have_posts() ): $i = 1; while( $bizcare_feature_query->have_posts() ) : $bizcare_feature_query->the_post(); $feature_page_array[] = array( 'feature-title' => get_the_title(), 'feature-content' => has_excerpt() ? get_the_excerpt() : bizcare_words_count($feature_single_number_words,get_the_content() ) , 'feature-url' => esc_url(get_the_permalink()), 'feature-icons-ids' => isset($feature_post_icon[$i]['feature-icons-ids']) ? $feature_post_icon[$i]['feature-icons-ids'] : 'fa-apple' ); $i++; endwhile; wp_reset_postdata(); endif; } return $feature_page_array; } endif; if( !function_exists('bizcare_feature_section') ) : /** * * Feature Section * * @since Bizcare 1.0.0 * * @param null * @return null * */ function bizcare_feature_section(){ global $bizcare_customizer_all_values; if( 1 != $bizcare_customizer_all_values['bizcare-feature-enable'] ){ return null; } $bizcare_feature_post_selection = $bizcare_customizer_all_values['bizcare-feature-select-form']; $bizcare_feature_section_title = $bizcare_customizer_all_values['bizcare-feature-section-title']; $bizcare_feature_section_sub_title = $bizcare_customizer_all_values['bizcare-feature-section-sub-title']; $bizcare_feature_button_text = $bizcare_customizer_all_values['bizcare-feature-button-text']; $bizcare_feature_button_url = $bizcare_customizer_all_values['bizcare-feature-button-url']; $bizcare_features = bizcare_feature_array( $bizcare_feature_post_selection ); if( !empty( $bizcare_feature_section_title ) || !empty( $bizcare_feature_section_sub_title ) || count($bizcare_features > 0 ) ) { ?>