Title: the_content
Published: April 25, 2014
Last modified: August 20, 2026

---

# the_content( string $more_link_text = null, bool $strip_teaser = false )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#parameters)
 * [More Information](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#more-information)
 * [Source](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#source)
 * [Hooks](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#hooks)
 * [Related](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#user-contributed-notes)

Displays the post content.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#parameters)󠁿

 `$more_link_text`stringoptional

Content for when there is more text.

Default:`null`

`$strip_teaser`booloptional

Strip teaser content before the more text.

Default:`false`

## 󠀁[More Information](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#more-information)󠁿

If the quicktag [<!--more-->](https://wordpress.org/documentation/article/write-posts-classic-editor/#visual-versus-text-editor)
is used in a post to designate the “cut-off” point for the post to be excerpted,
[the_content()](https://developer.wordpress.org/reference/functions/the_content/)
tag will only show the excerpt up to the <!--more--> quicktag point on non-single/
non-[permalink](https://wordpress.org/documentation/article/wordpress-glossary/#permalink)
post pages. By design, [the_content()](https://developer.wordpress.org/reference/functions/the_content/)
tag includes a parameter for formatting the <!--more--> content and look, which 
creates a link to “continue reading” the full post.

  **Notes about <!--more-->** :

 * No whitespaces are allowed **before** the “more” in the <!--more--> quicktag.
   In other words <!-- more --> will _not_ work!
 * _The <!--more--> quicktag will not operate and is ignored in [Templates](https://developer.wordpress.org/themes/classic-themes/basics/template-files/)
   where just one post is displayed, such as **single.php**._
 * Read [Customizing the Read More](https://codex.wordpress.org/Customizing_the_Read_More)
   for more details.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#source)󠁿

    ```php
    function the_content( $more_link_text = null, $strip_teaser = false ) {
    	$content = get_the_content( $more_link_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( ']]>', ']]&gt;', $content );
    	echo $content;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/post-template.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.1/src/wp-includes/post-template.php#L246)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/post-template.php#L246-L259)

## 󠀁[Hooks](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#hooks)󠁿

 [apply_filters( ‘the_content’, string $content )](https://developer.wordpress.org/reference/hooks/the_content/)

Filters the post content.

## 󠀁[Related](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#related)󠁿

| Uses | Description | 
| [get_the_content()](https://developer.wordpress.org/reference/functions/get_the_content/)`wp-includes/post-template.php` |

Retrieves the post content.

  | 
| [apply_filters()](https://developer.wordpress.org/reference/functions/apply_filters/)`wp-includes/plugin.php` |

Calls the callback functions that have been added to a filter hook.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#changelog)󠁿

| Version | Description | 
| [0.71](https://developer.wordpress.org/reference/since/0.71/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#user-contributed-notes)󠁿

 1.   [Skip to note 6 content](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#comment-content-338)
 2.    [Codex](https://profiles.wordpress.org/codex/)  [  11 years ago  ](https://developer.wordpress.org/reference/functions/the_content/#comment-338)
 3.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%23comment-338)
     Vote results for this note: 13[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%23comment-338)
 4.  **Overriding Archive/Single Page Behavior**
      If `[the_content()](https://developer.wordpress.org/reference/functions/the_content/)`
     isn’t working as you desire (displaying the entire story when you only want the
     content above the `<!--more-->` Quicktag, for example) you can override the behavior
     with global $more.
 5.      ```php
         // Declare global $more (before the loop).
         global $more;
     
         // Set (inside the loop) to display content above the more tag.
         $more = 0;
     
         the_content( 'More ...' );
         ?>
         ```
     
 6.  If you need to display all of the content:
 7.      ```php
         // Declare global $more (before the loop).
         global $more;
     
         // Set (inside the loop) to display all content, including text below more.
         $more = 1;
     
         the_content();
         ```
     
 8.   [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%3Freplytocom%3D338%23feedback-editor-338)
 9.   [Skip to note 7 content](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#comment-content-339)
 10.   [Codex](https://profiles.wordpress.org/codex/)  [  11 years ago  ](https://developer.wordpress.org/reference/functions/the_content/#comment-339)
 11. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%23comment-339)
     Vote results for this note: 3[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%23comment-339)
 12. **Ignore the “More” on a Sticky Post**
 13. This will ignore the more tag in a sticky 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 link.
 14.     ```php
         // Declare global $more (before the loop).
         global $more;
     
         if ( is_sticky() ) {
         	// Set (inside the loop) to display all content, including text below more.
         	$more = 1;
     
         	the_content();
         } else {
         	$more = 0;
     
         	the_content( __( 'Read the rest of this entry »', 'textdomain' ) );
         }
         ```
     
 15.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%3Freplytocom%3D339%23feedback-editor-339)
 16.  [Skip to note 8 content](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#comment-content-337)
 17.   [Codex](https://profiles.wordpress.org/codex/)  [  11 years ago  ](https://developer.wordpress.org/reference/functions/the_content/#comment-337)
 18. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%23comment-337)
     Vote results for this note: 1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%23comment-337)
 19. **Include Title in “More”**
      Show “Continue reading ACTUAL POST TITLE” when the
     Quicktag is used.
 20.     ```php
         <?php the_content( 'Continue reading ' . get_the_title() ); ?>
         ```
     
 21.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%3Freplytocom%3D337%23feedback-editor-337)
 22.  [Skip to note 9 content](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#comment-content-1779)
 23.   [nicoeg](https://profiles.wordpress.org/nicoeg/)  [  10 years ago  ](https://developer.wordpress.org/reference/functions/the_content/#comment-1779)
 24. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%23comment-1779)
     Vote results for this note: -1[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%23comment-1779)
 25. If the content you want to display does not belong to the post declared globally
     you can use [get_extended()](https://developer.wordpress.org/reference/functions/get_extended/)
     which accepts the content as first parameter.
      ` get_extended($content)
 26. Reference:
      [https://codex.wordpress.org/Function_Reference/get_extended](https://codex.wordpress.org/Function_Reference/get_extended)
 27.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%3Freplytocom%3D1779%23feedback-editor-1779)
 28.  [Skip to note 10 content](https://developer.wordpress.org/reference/functions/the_content/?output_format=md#comment-content-336)
 29.   [Codex](https://profiles.wordpress.org/codex/)  [  11 years ago  ](https://developer.wordpress.org/reference/functions/the_content/#comment-336)
 30. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%23comment-336)
     Vote results for this note: -5[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%23comment-336)
 31. **Designating the “More” Text**
      Displays the content of the post and uses “Read
     more …” for the more link text when the  Quicktag is used.
 32.     ```php
         <?php the_content( 'Read more ...' ); ?>
         ```
     
 33.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F%3Freplytocom%3D336%23feedback-editor-336)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fthe_content%2F)
before being able to contribute a note or feedback.