Redirect to login page when attempting to ask or answer a question

3.75K views
0

Is it possible too redirect to login page when attempting to ask or answer a question instead of being redirected to the ask page but with a login widget present?

0

override ask.php and add this at top:

if(!is_user_logged_in()){
	auth_redirect();
}

Thank you! I will try that.

The above solution did not work. For what I can tell, the login redirect has to be placed at the very top of the page being called and in anspress ask.php is an included part of a page rather than a page itself. The header and page title are already included before ask.php is included. So that solution definitely wouldn’t work