fixing syntax error in the functions file for the excerpt of the blocks
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 7 Sep 2018 15:25:15 +0000 (11:25 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 7 Sep 2018 15:25:15 +0000 (11:25 -0400)
functions.php

index c5302a9..5852588 100644 (file)
@@ -212,7 +212,7 @@ function content_excerpt($post_id, $length = 35){
     if( $the_post->post_excerpt ){
        $the_excerpt = $the_post->post_excerpt;
     } else {
-        $the_excerpt = apply_filters('the_content', $block->post_content);
+        $the_excerpt = apply_filters('the_content', $the_post->post_content);
     }
 
     $excerpt_length = $length; //Sets excerpt length by word count
@@ -224,7 +224,6 @@ function content_excerpt($post_id, $length = 35){
         array_push($words, '…');
         $the_excerpt = implode(' ', $words);
     endif;
-    echo $the_excerpt;
     return $the_excerpt;
 }
 ?>