Christmas Sale | Flat 20% OFF on All Themes Package. Use Coupon Code GTXMAS20 Buy Now

WordPress Website Templates

Find Professional WordPress themes Easy and Simple to Setup

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”);