support@gracethemes.com

Reply To: Slider blank lines and to short text

Home Support Business Growth WordPress Theme Slider blank lines and to short text Reply To: Slider blank lines and to short text

#4803

Yeah, I fixed it myself in the meantime, thanks for pointing me to the correct location.

My header.php now uses this to display the first paragraph, max 200 characters, truncated at a word.

$title = get_the_title( $id );
$post = get_post($id);
$content_long = apply_filters(‘the_content’, substr(strip_tags($post->post_content), 0, 400));
$content = strtok(wordwrap($content_long, 200, “…\n”), “\n”);