Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #379142

    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!

    #379656

    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

    #379717

    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.

    #380196

    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

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.