From: Anthony Talarico Date: Fri, 7 Sep 2018 15:40:16 +0000 (-0400) Subject: fixing the blocks output limit X-Git-Tag: v1.0.0^2~42 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=29388690b98e6829df615c02168d3537b1f0cdcd;p=WP-Themes%2Fcharemisd.git fixing the blocks output limit --- diff --git a/functions.php b/functions.php index 5852588..711d0ab 100644 --- a/functions.php +++ b/functions.php @@ -212,18 +212,20 @@ 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', $the_post->post_content); - } + $the_excerpt = $the_post->post_content; + } + $excerpt_length = $length; //Sets excerpt length by word count $the_excerpt = strip_tags(strip_shortcodes($the_excerpt)); //Strips tags and images $words = explode(' ', $the_excerpt, $excerpt_length + 1); - + if(count($words) > $excerpt_length) : array_pop($words); - array_push($words, '…'); + array_push($words, ''); $the_excerpt = implode(' ', $words); endif; + return $the_excerpt; } ?> diff --git a/parts/blog-feed-front.php b/parts/blog-feed-front.php index 825f48b..cd88570 100644 --- a/parts/blog-feed-front.php +++ b/parts/blog-feed-front.php @@ -71,7 +71,7 @@

post_title; ?>

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