wp_trim_words


wp_trim_words ( $text, $num_words = 55, $more = null )

Parameters:
  • (string) text Text to trim.
  • (int) num_words Number of words. Default 55.
  • (string) more Optional. What to append if $text needs to be trimmed. Default '…'.
Returns:
  • (string) Trimmed text.
Defined at:

Description

Trims text to a certain number of words.This function is localized. For languages that count 'words' by the individual character (such as East Asian languages), the $num_words argument will apply to the number of individual characters.

Related Functions

wp_set_password, wp_trim_excerpt, wp_title_rss, wp_trigger_error, wp_write_post

Top Google Results

User discussions

wpseek mobile