If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
I´m again… in the main index I would like to show only 200 caracteres… how can I change this code:?
you can use following code:
echo substr(strip_tags($post->post_content), 0, 200);
I put this way and this doesn´t works: (in the file “includes/loop-bloghome.php”)
$cats = get_the_category();
the_category(‘, ‘) ;
substr(strip_tags($post->post_content), 0, 200);
The topic ‘Howto get substring of the_content() ???’ is closed to new replies.