From 0a44926e1da5eccc47c5d832e81da665cfa8bb51 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Fri, 7 Sep 2018 11:24:10 -0400 Subject: [PATCH] adding content limit to the blocks output --- functions.php | 4 ++-- parts/blog-feed-front.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index 73ae0b2..c5302a9 100644 --- a/functions.php +++ b/functions.php @@ -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 = $the_post->post_content; + $the_excerpt = apply_filters('the_content', $block->post_content); } $excerpt_length = $length; //Sets excerpt length by word count @@ -224,7 +224,7 @@ function content_excerpt($post_id, $length = 35){ array_push($words, '…'); $the_excerpt = implode(' ', $words); endif; - + echo $the_excerpt; return $the_excerpt; } ?> diff --git a/parts/blog-feed-front.php b/parts/blog-feed-front.php index aed19b2..825f48b 100644 --- a/parts/blog-feed-front.php +++ b/parts/blog-feed-front.php @@ -71,9 +71,9 @@

post_title; ?>

- post_content) . $block->post_excerpt;?> + ID) . $block->post_excerpt;?> url) { ?> - + ...More content at this link
-- 2.17.1