This function can be useful for excerpt of the post
As opposed to wp_trim_words trims characters that makes text to
take the same amount of space in each post for example
public static trim_characters ( string $text, integer $num_chars = 60, string | null $more = null ) : string | ||
$text | string | Text to trim. |
$num_chars | integer | Number of characters. Default is 60. |
$more | string | null | Optional. What to append if $text needs to be trimmed. Default '…'. |
return | string | trimmed text. |