Closed getdave closed 11 years ago
There is a function in helpers to truncate the the_content(). It isn't particularly good and often does things like cut off mid-word and does not account for situations where it might accidentally break HTMK markup by trimming strings.
the_content()
A better solution is
<?php echo balanceTags(wp_trim_words( get_the_content(), $num_words = 20, $more = "..." ), true); ?>
Please implement, test and remove old function.
Closed via bc6482c863222e2830236d65eee8b7cf81e73e24
There is a function in helpers to truncate the
the_content()
. It isn't particularly good and often does things like cut off mid-word and does not account for situations where it might accidentally break HTMK markup by trimming strings.A better solution is
Please implement, test and remove old function.