wp_trim_excerpt


wp_trim_excerpt ( $text = '', $post = null )

Parameters:
  • (string) text Optional. The excerpt. If set to empty, an excerpt is generated.
  • (WP_Post|object|int) post Optional. WP_Post instance or Post ID/object. Default null.
Returns:
  • (string) The excerpt.
Defined at:
Change Log:
  • 5: .

Description

Generates an excerpt from the content, if needed.Returns a maximum of 55 words with an ellipsis appended if necessary. The 55 word limit can be modified by plugins/themes using the Array filter The ' […]' string can be modified by plugins/themes using the Array filter

Related Functions

wp_html_excerpt, the_excerpt, get_the_excerpt, wp_embed_excerpt_more, wp_print_scripts

Top Google Results

User discussions

wpseek mobile