Tagged: Blog Excerpts, enfold, Enfold Latest News
Hey guys,
Question….for the Widget “Enfold Latest News” I am wanting to condense the excerpt text and add a “…Read More” at the end of each excerpt. How do I do this?
I tried this – http://matthewfecher.com/webdesign/wp-quick-tip-how-to-change-the-excerpt-length/ but no avail :-(
Here is the site I am working on. http://paca.maximizedigital.com/
You can see half way down the page on the left-hand side where I am placing the Latest News.
Thank you guys so much!
Hey msbllc!
I didn’t see an excerpt but if you want to add a read more link then oen up /enfold/framework/php/class-framework-widgets.php and on lines 536 and 554 you should see this.
echo "<span class='news-time'>".get_the_time($time_format)."</span>";
And this beneath it.
echo "<a href = '".get_permalink()."'>Read more</a>";
Cheers!
Elliott
Thanks Elliott! That seemed to work perfectly.
Do you also know how/where I can condense the excerpt (reducing the amount of words)?
Also do you know how to edit the css specifically for that section without it effecting the actual blog css? I tried but unfortunately my css modifications effect my blog page as well.
Hi!
1. Try adding this to the bottom of your functions.php file.
function custom_excerpt_length( $length ) {
return 20;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );
2. Add this in front of your CSS to target just your homepage.
.home
For example.
.home .news-excerpt { font-size: 12px !important; }
Best regards,
Elliott