From: Anthony Talarico Date: Fri, 17 Aug 2018 14:33:01 +0000 (-0400) Subject: adding filter for testimonial rotator for the read more link X-Git-Tag: v1.0.0^2~18 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=6a938273705c7f08456ee867c95799a64e624f2b;p=WP-Themes%2Fnorthlandstorage.git adding filter for testimonial rotator for the read more link --- diff --git a/content-search.php b/content-search.php index 1ba7228..793f798 100644 --- a/content-search.php +++ b/content-search.php @@ -13,9 +13,6 @@ ', esc_url( get_permalink() ) ), '' ); ?> -
- -
diff --git a/content-single.php b/content-single.php index 2ca25c9..e72b95e 100644 --- a/content-single.php +++ b/content-single.php @@ -6,6 +6,8 @@ $post_date = of_get_option('post_date'); $post_footer = of_get_option('post_footer'); $post_date_class = ((!empty($post_date) && $post_date == ' ') || has_post_thumbnail()) ? " no-date" : ""; +global $post; +$post_type = $post->post_type; ?>
>
diff --git a/functions.php b/functions.php index e3c4b03..490d07f 100644 --- a/functions.php +++ b/functions.php @@ -110,8 +110,8 @@ function accesspress_parallax_widgets_init() { ) ); register_sidebar( array( - 'name' => __( 'Footer One', 'accesspress-parallax' ), - 'id' => 'footer-1', + 'name' => __( 'Testimonials', 'accesspress-parallax' ), + 'id' => 'testimonials-sidebar', 'description' => '', 'before_widget' => '', @@ -348,3 +348,11 @@ function my_nav_wrap() { // return the result return $wrap; } +function hg_testimonial_rotator_the_excerpt( $html, $limit ) +{ + global $post; + $link = get_permalink( $post->ID ); + $more_text = " ...Read More "; + return wp_trim_words(get_the_excerpt(), $limit, $more_text); +} +add_filter('testimonial_rotator_the_excerpt', 'hg_testimonial_rotator_the_excerpt', 10, 2); diff --git a/single.php b/single.php index 8f8756b..c511794 100644 --- a/single.php +++ b/single.php @@ -4,7 +4,8 @@ * * @package accesspress_parallax */ - +global $post; +$post_type = $post->post_type; get_header(); ?>
@@ -36,7 +37,9 @@ get_header(); ?>
+ + + -