0

I've got a few custom meta fields I'd like to be displayed in RSS feeds. Right now they do not because they are not part of the_content I reckon.

If anyone has any tips for getting this to happen, please let me know!

Thanks!

1

Try, not tested,

add_filter('the_content_feed','add_my_fields_to_rss');

function add_my_fields_to_rss($content) {
  global $post;
  $mymeta = get_post_meta($post->ID, 'my_meta', true);
  $content .= $mymeta;
  return $content;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.