Using WordPress 3, creating write panels with Magic Fields, how do I add custom fields to my RSS feed?
For example, I have an ‘image of the day’ write panel, with a custom field for the photo credit. How can I include all that as part of my feed?
Thanks.
you can use something like this
function feed_magic_fields( $content ) {
global $post, $id;
if ( !is_feed() )
return $content;
// is feed
$date = get('date_event');
if( $date)
$content .= $date
return $content;
}
add_filter( 'the_content', 'feed_magic_fields' );