How to avoid redirect 302 in wordpress to the author pages?
Question
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() );
exit;
}
get_header();
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.
0
2 months
0 Answers
20 views
0
Leave an answer
You must login or register to add a new answer .