Expcerpt length
-
HI,
My code is:
<?php $text = $post->post_excerpt;if (strlen($text) > 40) { $text = substr($text,0,strpos($text,' ',40)); } ; $text = $text . ''; echo apply_filters('the_excerpt',get_the_excerpt().'<a href="'.get_permalink().'"> Read More </a>'); ?>
I want to limit expcerpt lenth in 40 wards, but i cant do it with above code.
please help me…
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Expcerpt length’ is closed to new replies.