Ready to get started?Download WordPress


Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Template Tags/get the content feed

This article is a ROUGH DRAFT. The author is still working on this document, so please do not edit this without the author's permission. The content within this article may not yet be verified or valid. This information is subject to change.


Retrieve the content of the current post formatted for a Feed. This tag must be within The_Loop.


<?php $content get_the_content_feed$feed_type ?>


(string) (optional) The type of feed. rss2, atom, rss or rdf
Default: null

Return Values

The post content.


get_the_content_feed() can be used to retrieve and store the value in a variable, without outputting it to the page.

$my_content = get_the_content_feed();
if ( $my_content != '' ) {
	// Some string manipulation performed
echo $my_content; // Outputs the processed value to the page

Change Log

Since: 2.9.0

Source File

get_the_content_feed() is located in wp-includes/feed.php.



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