August 27, 2014 at 1:38 am
#13312
David
Member
Ok – I took a stab at this myself. Here is what I did if anyone else wants to do this…
first I made a function.php file in my child theme and added the following function
function get_excerpt(){
$excerpt = get_the_content();
$excerpt = preg_replace(" (\[.*?\])",'',$excerpt);
$excerpt = strip_shortcodes($excerpt);
$excerpt = strip_tags($excerpt);
$excerpt = substr($excerpt, 0, 140);
$excerpt = substr($excerpt, 0, strripos($excerpt, " "));
$excerpt = trim(preg_replace( '/\s+/', ' ', $excerpt));
$excerpt = $excerpt = '<p>'.$excerpt.'... </p>';
return $excerpt;
}
On 6th line you can change the 140 to however many characters you like.
Then on line 338 of inc/widgets/interface_widgets.php I changed the code to
<?php get_excerpt(); ?>
I tried making a copy of the file with the changes in my child theme but it won’t override the parent theme – therefore this change will be lost upon updating. Anyone got any thoughts on how to accomplish this without losing the changes on the next update?