The problem is that when I implement this function in $current_post, that all the content in the site gets trimmed. Not only the blog index “preview” page. Where do I need to put this function? In loop-index.php right?
I used this piece of code in includes/loop-index.php
$current_post = wp_trim_words( get_the_content(), 100);
Like I said in the previous comment, I know I can do that, but since I have more than 100 articles I need a kind of function to apply this to every article. For example lets say, trim the text after 100 words.
I a piece of code, but it trims the whole blog article instead of giving a preview with a read more link.
Could you give me advise how to integrate this?