How to avoid redirect 302 in wordpress to the author pages?


In my theme when I try to access an author’s page when I’m offline, it does a 302 redirect to the home page, I was looking at the theme files and in author.php I see the following code that I think does the redirection:

if ( ! is_user_logged_in() ) {
    wp_safe_redirect( home_url() );


I don’t use a child theme, so I’d like to avoid that redirect with some snippet or best practice. I have searched, but what I see are answers to how to make a snippet for a redirect but not to avoid it.

DrWho 2 months 0 Answers 20 views 0

Leave an answer