Put maximum lines in the wordpress summary

Asked

Viewed 33 times

0

Hello guys I would like to know how do I put a limit of 5 lines in the summary.

<?php the_excerpt(); ?>

1 answer

1


As far as I know by lines you could not do, but could be done by volume of characters as follows::

<?php   
    $content = get_the_content('',FALSE,'');    
    $content = apply_filters('the_content', $content);  
    $content = str_replace(']]>', ']]>', $content);     
    echo substr($content,0,262); 
?>&hellip;
  • vlw friend I got...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.