• Have used the below code in the child theme’s functions.php to disable author name in WordPress feeds. After running the same scan couple of times produces varying results that reveal the author name and that don’t. How can I ensure author name is disabled and/or not revealed?

    function disable_rss_author( $display_name ) {
        if ( is_feed() ) {
            return '';
        }
        return $display_name;
    }
    add_filter( 'the_author', 'disable_rss_author');
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • @eddyferns

    try this by setting priority for add_filter function:

    function disable_rss_author( $display_name ) {
        if ( is_feed() ) {
            return '';
        }
        return $display_name;
    }
    add_filter( 'the_author', 'disable_rss_author',40);
    • This reply was modified 4 years, 7 months ago by Suman.
    Thread Starter eddyferns

    (@eddyferns)

    Thank you for your reply.

    Tried the priority setting but the author name is displaying in the very first scan.

    Previously I tried priority at 1, but as mentioned there were mixed results. 99999 priority also revealed the username.

    • This reply was modified 4 years, 7 months ago by eddyferns.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Author name – RSS Feed’ is closed to new replies.