WordPress.org

Support

Support » Plugins and Hacks » Testimonial Slider » Doesn't return true excerpt, here's a fix

Doesn't return true excerpt, here's a fix

  • The slider doesn’t return the true excerpt since the custom post type it creates doesn’t have excerpt support.

    Edit testimonial-slider.php and Change line 568

    'supports' => array('title','editor','excerpt')

    and then to your functions.php add the following:

    ‘add_filter(‘testimonial_slide_excerpt’,’my_testimonial_excerpt’,10,3);

    /* this will return excerpt regardless of the setting in the slider settings */
    function my_testimonial_excerpt($excerpt,$post_id,$slider,$css){
    $testi_post = $post_id;
    if(has_excerpt($testi_post))
    {
    $testi_post = get_post($post_id);
    return $testi_post->post_excerpt;
    }
    return $excerpt;
    }’

    http://wordpress.org/plugins/testimonial-slider/

  • The topic ‘Doesn't return true excerpt, here's a fix’ is closed to new replies.
Skip to toolbar