the_excerpt()

0.007916 сек
Очень медленно

Outputs a «snippet» of a post or the first 55 words of content, with an insert at the end […].

Used inside the WordPress loop.

If «Excerpt» is not specified (specified when creating the post), the function will «create» it by itself from the first 55 words of the content. HTML tags, shortcodes, and graphics will be cut out (they won’t be taken into account when calculating words).

If «Excerpt» is specified, it will be rendered as-is. The […] construct is not added to the end in this case.

If the current entry is an attachment (displayed in attachment.php or image.php), this function will display the text specified in the «caption» field and the text will not have an […] at the end.

The final text (the result of the function) is passed through the_excerpt filter, which, among other things, processes the text with the wpautop() function — it wraps the quote in a
tag.

This function does not handle the tag <!—more—> in post content, so sometimes it is better to use the_content().

Works based on: get_the_excerpt()

Функции

Подпишитесь на новости

Никакого спама, только полезные материалы и новости.