How to correctly limit the content and strip HTML?
First, I wouldn’t modify the string/word length of the content. Semantically, you’re dealing with an excerpt, so let’s focus on that. Second, to limit the number of words returned for the excerpt, simply filter excerpt_length: <?php function wpse52673_filter_excerpt_length( $length ) { // Return (integer) value for // word-length of excerpt return 150; } add_filter( ‘excerpt_length’, … Read more