How to remove login popup and redirect user on User Pro login page?

6.85K viewsGeneral
0

I have used User Pro plugin to maintain user login and registration. So i want to integrate AnsPress with User Pro. And i want to redirect user on User Pro login/registration page when user click login/signup from ask question or write answer page  if he is not logged in.

Thank You!

0

this worked for me
function ap_page_template_redirect()
{
if( is_ask() && ! is_user_logged_in() )
{
auth_redirect();
exit();
}
}

You are viewing 1 out of 2 answers, click here to view all answers.