Testimonial Content Not Loading
-
I’m using the theme Zap Lite which implements your plugin. When I use the shortcode they provide, it loads author and company fields, but not the actual testimonials. Here’s their function:
function zap_testimonial_carousel_shortcode( $atts, $content = null ) { extract( shortcode_atts( array( 'category' => '', 'limit' => '-1' ), $atts ) ); $output = ''; query_posts(array( 'post_type' => 'testimonial', 'posts_per_page' => $limit, 'easy-testimonial-category' => $category, 'post_status' => 'publish' )); if ( !have_posts() ) { wp_reset_query(); wp_reset_postdata(); return; } $output = ' <div class="testimonial-wrapper"> <div id="testimonial-container">'; while(have_posts()) { the_post(); $output .= ' <div class="testimonial-item"> <div class="testimonial-data"> <p class="testimonial-content paint-area paint-area--text"><span class="testimonial-quote icon-quote-left"></span>'.get_the_excerpt().'</p>'; if ( get_post_meta(get_the_ID(), '_ikcf_client', true) ) { $output .= '<span class="testimonial-author paint-area paint-area--text">'.get_post_meta(get_the_ID(), '_ikcf_client', true).'</span>'; } if ( get_post_meta(get_the_ID(), '_ikcf_position', true) ) { $output .= '<span class="testimonial-company paint-area paint-area--text">'.get_post_meta(get_the_ID(), '_ikcf_position', true).'</span>'; } $output .= ' </div> <div class="testimonial-image">'; $img = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); if ( !empty($img['0']) ) { $output .= '<img src="'.$img['0'].'" class="attachment-tbtestimonial_thumbnail wp-post-image" alt="testimonial-image">'; } $output .= ' </div> <div class="clearfix"></div> </div>'; } $output .= '</div><div class="testimonial-pagination"></div></div>'; wp_reset_query(); wp_reset_postdata(); return $output; }
It appears that get_the_excerpt is empty. Any idea what’s going on? Tyia.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Testimonial Content Not Loading’ is closed to new replies.