It's time for my annual "Try to fix my RSS feed" day again. I've just updated everything to the latest version (Wordpress 3.0.3, PhotoQ 1.9, IQ2 1.3) hoping that my previous problem would go away but, unfortunately, my post description is still not included in the <content:encoded> section of each post's RSS item. Delving through the PHP for WordPress itself, I have absolutely no idea why this should be. I've made some changes to the IQ2Theme.php file for debug as follows:
`//add description to feeds
add_filter('the_content_feed', array(&$this, 'addDescrToFeed'));
add_filter('the_excerpt_rss', array(&$this, 'addDescrToFeedExcerpt'));`
The first add_filter used "the_content_rss" initially but I gather this is now deprecated in favour of "the_content_feed". Even after changing this, I see no difference (though, frankly, I'm not convinced that FeedBurner's refresh is working properly so I'll check again in an hour or so). I also doubled up the addDescToFeed function so that I can tell exactly which hook is being called:
`/**
* Filter hook to add the description to the RSS feeds
* @param $content
* @return unknown_type
*/
function addDescrToFeed($content){
global $post;
/* if($this->_oc->getValue('feedShowDescr')){ */
$content .= "<!-- addDescrToFeed -->";
$content .= get_post_meta($post->ID, 'photoQDescr', true);
/* } */
return $content;
}
function addDescrToFeedExcerpt($content){
global $post;
if($this->_oc->getValue('feedShowDescr')){
$content .= "<!-- addDescrToFeedExcerpt -->";
$content .= get_post_meta($post->ID, 'photoQDescr', true);
}
return $content;
}`
Looking at the XML generated for my feed, I see that the addDescrToFeedExcerpt filter was called to fill in the <description> block but that the addDescToFeed filter was never called when <content:encoded> was set up. The code in WordPress's feed.php which I presume is called to generate this block (isn't "grep" a wonderful debugging tool?) calls:
return apply_filters('the_content_feed', $content, $feed_type);
so I can't see why our filter isn't being used. Any ideas?
Any help you can offer on this would be excellent since this is really driving me mad. How difficult can it be to get the description text to appear underneath the full resolution photo in the RSS feed?