WordPress.org

Ready to get started?Download WordPress

Codex

Function Reference/get the content

Contents

Description

Retrieve the post content. (Must be used in a Loop)

Usage

<?php get_the_content$more_link_text$stripteaser ?>

Parameters

$more_link_text
(string) (optional) Content for when there is more text.
Default: null
$stripteaser
(boolean) (optional) Strip teaser content before the more text.
Default: false

Return Values

(string) 

Examples

Display the post content, ending with "Read more" if needed

<?php
$content = get_the_content('Read more');
print $content;
?>

Notes

If you use plugins that filter content (add_filter('the_content')), then this will not apply the filters, unless you call it this way (using apply_filters):

<?php apply_filters('the_content',get_the_content$more_link_text$stripteaser$more_file )) ?>

Change Log

Since: 0.71

Source File

get_the_content() is located in wp-includes/post-template.php.

Related

See also index of Function Reference and index of Template Tags.