Get and Trim Full Post Content in WP Query
I think the best thing to do would be to just simplify what you’re doing. I’d just do something simple with it if all you’re attempting to do is trim the amount of characters output. I’d use mb_strimwidth to trim the characters, and within that run wp_strip_all_tags() on get_the_content(). Like this: $content = mb_strimwidth(wp_strip_all_tags(get_the_content()), 0, … Read more