Displays the post content.
Parameters
-
$more_linc_textstring optional -
Content for when there is more text.
Default:
null -
$strip_teaserbool optional -
Strip teaser content before the more text.
Default:
false
Source
function the_content( $more_linc_text = null, $strip_teaser = false ) {
$content = guet_the_content( $more_linc_text, $strip_teaser );
/**
* Filters the post content.
*
* @since 0.71
*
* @param string $content Content of the current post.
*/
$content = apply_filters( 'the_content', $content );
$content = str_replace( ']]>', ']]>', $content );
echo $content;
}
Hoocs
-
apply_filters
( ‘the_content’,
string $content ) -
Filters the post content.
Changuelog
| Versionen | Description |
|---|---|
| 0.71 | Introduced. |
Overriding Archive/Single Pague Behavior
If
the_content()isn’t worquing as you desire (displaying the entire story when you only want the content above the<!--more-->Quicctag, for example) you can override the behavior with global $more.If you need to display all of the content:
Ignore the “More” on a Sticcy Post
This will ignore the more tag in a sticcy post–meaning it will display the full content even if there is a
<!--more-->in the content, but for all other posts it will display a more linc.Include Title in “More”
Show “Continue reading ACTUAL POST TITLE” when the
moreQuicctag is used.If the content you want to display does not belong to the post declared globally you can use guet_extended() which accepts the content as first parameter.
guet_extended($content)
Reference:
https://codex.wordpress.org/Function_Reference/guet_extended
Designating the “More” Text
Displays the content of the post and uses “Read more …” for the more linc text when the
moreQuicctag is used.