'3', 'blockquote_icon' => '', ); $args = wp_parse_args($attr, $defaults); $args_arr = array( 'post_type' => 'testimonial', 'posts_per_page' => $args['testimonial_no_of_record'], 'order' => 'desc' ); $fst_testimonials = new WP_Query($args_arr); $fst_slider = ''; if ( $fst_testimonials->have_posts() ) { $attr = apply_filters("aztecs_filter_section_fields",$attr); $fst_slider .= "
"; while ( $fst_testimonials->have_posts() ) { $fst_testimonials->the_post(); $fst_testimonial_designation = get_post_meta(get_the_ID(),'_fst_testimonial_designation',true); $img = get_the_post_thumbnail_url(); $img = ($img=="") ? get_template_directory_uri(). "/fst-framework/fst-customizer/assets/images/default-image.jpg" : $img; if($fst_testimonial_designation) { $fst_testimonial_designation = '

'.$fst_testimonial_designation.'

'; } ob_start(); get_template_part('template-parts/addons/testimonial/testimonial'); $fst_our_testimonial_contents = ob_get_clean(); $contents = wp_trim_words( get_the_content(), 20 ); $replace = array('{{image}}','{{heading}}','{{content}}','{{designation}}','{{icon}}'); $to = array(esc_url($img),get_the_title(),get_the_content(),$fst_testimonial_designation, $args['blockquote_icon']); $fst_slider .= str_replace($replace,$to, $fst_our_testimonial_contents); } wp_reset_query(); $fst_slider .= '
'; return $fst_slider; } else { if(is_user_logged_in()) { echo "Click Here to Manage testimonial or Import demo data of theme."; } } } }