Topic: Add readmore automatically withour {cut}

This code is well done to show only 400 characters?

<?php  if(strlen($post['content']) > 400){
    echo substr($post['content'], 0, 400); 
?>
<br>
<a  class="btn btn-danger" href="<?php echo Option::get('siteurl'); ?><?php echo Blog::$parent_page_name; ?>/<?php echo $post['slug'] ?>">Read more</a>
<?php }else { 
  echo $post['content']; 
}?>

nakome's Website

2 Yesterday 10:15:20

Re: Add readmore automatically withour {cut}

Use this method https://github.com/MonstraLab/monstra-c … #L240-L260

3 Yesterday 10:59:37

Re: Add readmore automatically withour {cut}

Nice wink ,thanks master

nakome's Website