Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to change the author element of the feed from dc:creator to author. How does this is possible?

share|improve this question
    
<author> and <dc:creator> are not the same thing - the <author> element should contain the author's email address. See this trac ticket: core.trac.wordpress.org/ticket/15136 –  anu Jun 28 '11 at 14:25
    
Ok done it. You should add it as an answer –  Xalloumokkelos Jun 28 '11 at 14:36
    
Done what? I don't really regard my comment as an answer, it's a warning about the difference between <author> and <dc:creator> –  anu Jun 28 '11 at 14:37
    
I have placed the <author></author> inside the feed-rs2.php –  Xalloumokkelos Jun 28 '11 at 14:39
    
ok, but that's not what I've suggested, and that's not a good way of doing it, as when you upgrade WordPress you'll lose your change. Have a look at my answer below. –  anu Jun 28 '11 at 14:44

1 Answer 1

up vote 0 down vote accepted

Bearing in mind my comment about, you can use the rss_item hook to add a filter that will let you add the <author>element to your feed

function add_author_to_feed($feed) {
  $feed .= '<author>' . the_author_meta('user_email') . '</author>';
  return $feed
}

add_filter('rss_item', 'add_author_to_feed');

(note - this code is not tested)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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