Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Edit Post Author Name in WordPress Feeds
<?php
function my_rss2_ns(){
global $in_rss_feed;
$in_rss_feed = true;
}
add_action('rss2_ns', 'my_rss2_ns');
function my_the_author($author){
global $in_rss_feed;
if($in_rss_feed){
$author = "My Company Name";
}
return $author;
}
add_filter('the_author', 'my_the_author');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.