#15604 closed defect (bug) (fixed)
Empty post leads to use of excerpt in feed
| Reported by: | niska | Owned by: | markjaquith |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Feeds | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description (last modified by )
The content of my posts are empty. Instead I'm using custom fields. I'm using the filter the_content to format the content. Like this
function my_content($text) {
$postid = get_the_ID();
$desc = get_post_meta($postid, 'productdescription', true);
return $desc;
}
add_filter('the_content', 'my_content', 0);
However. Since the "real" content is empty. It seems as if wordpress, in the feed, use the excerpt, instead of the content.
My temporary solution is to insert a dot "." in the content window and click save.
Attachments (2)
Change History (9)
#1
@
16 years ago
- Component General → Feeds
- Keywords has-patch needs-testing 3.2-early added
- Milestone Awaiting Review → Future Release
#3
follow-up:
↓ 4
@
14 years ago
Unlike get_the_content(), get_the_content_feed() does have the the_content filter in it. Looks good to me. Might be worth a $content = get_the_content_feed() then echo $content, to save the extra processing.
#4
in reply to: ↑ 3
@
14 years ago
Replying to nacin:
Might be worth a $content = get_the_content_feed() then echo $content, to save the extra processing.
Done in 15604.2.diff.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Looking at the logic behind the RSS2 Feed, The feed is designed to always have content available.
However, We are not looking at the filtered post_content results, which will skew the feeds to ignoring hooks which add content to the post.
See patch