How can I change the author name on the frontend to be the sitename instead without modifying theme?

I am basically looking for something that I can package as plugin on my site that will no longer show the authors name whatsoever on the posts or pages on the frontend.


You could modify it through the the_author filter:

 * Set the author name as the site title.

! is_admin() && add_filter( 'the_author', 
    function( $author )
        return get_bloginfo( 'name' ); 

where we change the author name to the site name on the frontend with the help of the get_bloginfo() function.

| improve this answer | |

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.