'page', 'post__in' => $testimonial_page_id, 'orderby' => 'post__in', 'order' => 'ASC' ); } } if( !empty( $testimonial_args ) ){ /*Query start*/ $testimonial_ars_query = new WP_Query($testimonial_args); if( $testimonial_ars_query->have_posts() ) : $i = 1; while( $testimonial_ars_query->have_posts() ) : $testimonial_ars_query->the_post(); $th_image = false; if(has_post_thumbnail()){ $thumb = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), 'thumbnail' ); $th_image = $thumb['0']; } $testimonial_arrays[] = array( 'testimonial-title' => get_the_title(), 'testimonial-content' => has_excerpt() ? get_the_excerpt() : business_click_words_count($testimonila_number_of_word,get_the_content() ) , 'testimonial-url' => esc_url(get_the_permalink()), 'testimonial-image' => $th_image, 'testimonial-designation-ids' => isset( $testimonial_post_designation[$i]['testimonial-designation-ids'] ) ? $testimonial_post_designation[$i]['testimonial-designation-ids'] : '', ); $i++; endwhile; wp_reset_postdata(); endif; } return $testimonial_arrays; } endif; if( !function_exists('testimonial_section') ) : /** *Testimonial array creation * * @since Business Click 1.0.0 * * @param null * @return null */ function testimonial_section(){ global $business_click_customizer_all_values; if( ! $business_click_customizer_all_values['business-click-testimonila-enable'] ){ return null; } $testimonial_select_post = esc_html($business_click_customizer_all_values['business-click-testimonial-select-for-page'] ); $tesimonial_pages_array = business_click_testimonial_arrays($testimonial_select_post); if( is_array($tesimonial_pages_array) ) { $testimonila_section_title = esc_html($business_click_customizer_all_values['business-click-testimonial-section-title'] ); $testimonila_background_image = esc_url($business_click_customizer_all_values['business-click-testimonial-background-image'] ); ?> 0 ) { ?>

0 ) {?>