'post', 'cat' => $bizplus_home_service_category, 'posts_per_page' => $bizplus_home_service_number ); } }else { $bizplus_home_service_posts = evision_customizer_get_repeated_all_value(3 , $bizplus_home_service_page); $bizplus_home_service_posts_ids = array(); if( null != $bizplus_home_service_posts ) { foreach( $bizplus_home_service_posts as $bizplus_home_service_post ) { if( 0 != $bizplus_home_service_post['bizplus-home-service-pages-ids'] ){ $bizplus_home_service_posts_ids[] = $bizplus_home_service_post['bizplus-home-service-pages-ids']; } } if( !empty( $bizplus_home_service_posts_ids )){ $bizplus_home_service_args = array( 'post_type' => 'page', 'post__in' => $bizplus_home_service_posts_ids, 'posts_per_page' => $bizplus_home_service_number, 'orderby' => 'post__in' ); } } } // the query if( !empty( $bizplus_home_service_args )){ $bizplus_home_service_contents_array = array(); /*again empty array*/ $bizplus_home_service_post_query = new WP_Query( $bizplus_home_service_args ); if ( $bizplus_home_service_post_query->have_posts() ) : $i = 1; while ( $bizplus_home_service_post_query->have_posts() ) : $bizplus_home_service_post_query->the_post(); $bizplus_home_service_contents_array[$i]['bizplus-home-service-title'] = get_the_title(); if (has_excerpt()) { $bizplus_home_service_contents_array[$i]['bizplus-home-service-content'] = get_the_excerpt(); } else { $bizplus_home_service_contents_array[$i]['bizplus-home-service-content'] = bizplus_words_count( $bizplus_home_service_single_words ,get_the_content()); } $bizplus_home_service_contents_array[$i]['bizplus-home-service-link'] = get_permalink(); if(isset( $bizplus_icons_arrays[$i] )){ $bizplus_home_service_contents_array[$i]['bizplus-home-service-page-icon'] = $bizplus_icons_arrays[$i]['bizplus-home-service-page-icon']; } else{ $bizplus_home_service_contents_array[$i]['bizplus-home-service-page-icon'] = 'fa-desktop'; } $url =''; if(has_post_thumbnail()){ $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'bizplus-costume-medium' ); $url = $thumb['0']; } else{ $url = NULL; } $bizplus_home_service_contents_array[$i]['bizplus-home-service-page-image'] = $url; $i++; endwhile; wp_reset_postdata(); endif; } return $bizplus_home_service_contents_array; } endif; if ( ! function_exists( 'bizplus_home_service' ) ) : /** * Service Section * * @since bizplus 1.0.0 * * @param null * @return null * */ function bizplus_home_service() { global $bizplus_customizer_all_values; if( 1 != $bizplus_customizer_all_values['bizplus-home-service-enable'] ){ return null; } $bizplus_home_service_selection_options = $bizplus_customizer_all_values['bizplus-home-service-selection']; $bizplus_service_arrays = bizplus_home_service_array( $bizplus_home_service_selection_options ); if( is_array( $bizplus_service_arrays )){ $bizplus_home_service_number = absint($bizplus_customizer_all_values['bizplus-home-service-number']); $bizplus_home_service_enable_thumbnail = $bizplus_customizer_all_values['bizplus-home-service-thumbnail-enable']; $bizplus_home_service_button_text = $bizplus_customizer_all_values['bizplus-home-service-button-text']; $bizplus_home_service_button_link = $bizplus_customizer_all_values['bizplus-home-service-button-link']; $bizplus_home_service_enable_single_link = $bizplus_customizer_all_values['bizplus-home-service-enable-single-link']; ?>
'page', 'post__in' => $bizplus_home_service_main_posts_ids, 'orderby' => 'post__in' ); } if( !empty( $bizplus_home_service_main_args )){ $home_service_main_page_query = new WP_Query($bizplus_home_service_main_args); while ($home_service_main_page_query->have_posts()): $home_service_main_page_query->the_post(); ?>

"; } $i++; } ?>