WordPress.org

Ready to get started?Download WordPress

Forums

Testimonial Slider
Doesn't return true excerpt, here's a fix (1 post)

  1. Shivanand The Designer
    Member
    Posted 11 months ago #

    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/

Reply

You must log in to post.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 11 months ago by Shivanand The Designer
  • This topic is not resolved
  • WordPress version: 3.6.1