WordPress.org

Ready to get started?Download WordPress

Forums

How to: Add info after author name in the RSS feed (1 post)

  1. boonesimpson
    Member
    Posted 1 year ago #

    I had to find a way to add arbitrary information (the publication name) after the author name in our RSS feeds.

    Here is how I did it.

    add_filter( 'the_author', 'edit_author', 10 );
    function edit_author( $author ) {
        if ( !is_feed() ){ return $author; }
            else{
            $author = $author.' - My Awesome Site';
    		 return $author;
    		 }
    }

    I figured since I needed to do it, others might as well.
    Especially helpful when you have other sites syndicating your content.

Topic Closed

This topic has been closed to new replies.

About this Topic