'page', 'post__in' => $biography_home_testimonial_posts_ids, 'posts_per_page' => 3, 'orderby' => 'post__in' ); } } // the query if( !empty( $biography_home_testimonial_args )){ $biography_home_testimonial_contents_array = array(); $biography_home_testimonial_post_query = new WP_Query($biography_home_testimonial_args); if ($biography_home_testimonial_post_query->have_posts()) : $i = 0; while ($biography_home_testimonial_post_query->have_posts()) : $biography_home_testimonial_post_query->the_post(); $url = get_template_directory_uri().'/assets/img/sayer-no-image.jpg'; if(has_post_thumbnail()){ $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'thumbnail' ); $url = $thumb['0']; } $biography_home_testimonial_contents_array[$i]['biography-home-testimonial-title'] = get_the_title(); $biography_home_testimonial_contents_array[$i]['biography-home-testimonial-image'] = $url; $biography_home_testimonial_contents_array[$i]['biography-home-testimonial-content'] = biography_words_count( 30 ,get_the_content()); $i++; endwhile; wp_reset_postdata(); endif; } return $biography_home_testimonial_contents_array; } endif; if (!function_exists('biography_home_testimonial')) : /** * Featured Slider * * @since Biography 1.0.0 * * @param null * @return null * */ function biography_home_testimonial() { global $biography_customizer_saved_options; $biography_home_testimonial_title = $biography_customizer_saved_options['biography-home-testimonial-title']; $biography_testimonial_arrays = biography_home_testimonial_array(); if (is_array($biography_testimonial_arrays)) { ?>