'page', 'post__in' => $bizlight_home_testimonial_posts_ids, 'posts_per_page' => 5, 'orderby' => 'post__in' ); } } // the query if( !empty( $bizlight_home_testimonial_args )){ $bizlight_home_testimonial_contents_array = array(); $bizlight_home_testimonial_post_query = new WP_Query($bizlight_home_testimonial_args); if ($bizlight_home_testimonial_post_query->have_posts()) : $i = 0; while ($bizlight_home_testimonial_post_query->have_posts()) : $bizlight_home_testimonial_post_query->the_post(); $url =''; if(has_post_thumbnail()){ $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'thumbnail' ); $url = $thumb['0']; } else{ $url = NULL; } $bizlight_home_testimonial_contents_array[$i]['bizlight-home-testimonial-title'] = get_the_title(); $bizlight_home_testimonial_contents_array[$i]['bizlight-home-testimonial-content'] = bizlight_words_count( 30 ,get_the_content()); $bizlight_home_testimonial_contents_array[$i]['bizlight-home-testimonial-image'] = $url; $i++; endwhile; wp_reset_postdata(); endif; } return $bizlight_home_testimonial_contents_array; } endif; if (!function_exists('bizlight_home_testimonial')) : /** * Featured Slider * * @since Bizlight 1.0.0 * * @param null * @return null * */ function bizlight_home_testimonial() { global $bizlight_customizer_all_values; $bizlight_home_testimonial_image_option = $bizlight_customizer_all_values['bizlight-home-testimonial-image-enable']; if (1 != $bizlight_customizer_all_values['bizlight-home-testimonial-enable']) { return null; } $bizlight_testimonial_arrays = bizlight_home_testimonial_array(); if (is_array($bizlight_testimonial_arrays)) { ?>