the_content_feed WordPress Filter Hook

The the_content_feed Wordpress hook allows you to modify the content of your feed before it is outputted. This can be useful if you want to add custom content or strip certain content from your feed.

apply_filters( 'the_content_feed', string $content, string $feed_type ) #

Filters the post content for use in feeds.


Parameters

$content

(string)The current post content.

$feed_type

(string)Type of feed. Possible values include 'rss2', 'atom'. Default 'rss2'.


Top ↑

More Information

  • The “the_content_feed” filter is used to filter the content of the post after it is retrieved from the database and filtered by “the_content” hook and before it is sent to RSS reader (or browser).
  • The filter callback function must return the content after it is finished processing, or feed readers will see a blank item and other plugins also filtering the feed content may generate errors.

Top ↑

Source

File: wp-includes/feed.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
2.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.