Sometimes a private WP is run and the Membership option (everybody can register) is OFF.
I would be nice that in the case of private WP, Anspress doesn’t display the login/register form as the end of the Ask Question page.
Your request is very specific and IMHO Anspress don’t need it, probably only few people or less will ever use it. That said, You can do it Yourself, it is fairly simple.
You need to add new folder (name it anspress) to Your WordPress theme, like this your_theme/anpress/ To that folder You need to copy login-signup.php file from Your Anspress plugin dir (anspress-question-answer/theme/default/login-signup.php) or download it from here (right click and save file as).
Now there is time to edit that file, and there are two options:
- Ugly one – just delete everything but leave <?php at beginning of the file.
- Less ugly – edit if statement from beginning to add new condition.
In case of second option now if user is not logged in and You don’t Allow anonymous, then login/register form will be shown. So we need to also check for “Anyone can register” switched off.
<?php if(!is_user_logged_in() && !ap_opt('allow_anonymous')): ?>
<?php if(!is_user_logged_in() && !ap_opt('allow_anonymous') && get_option('users_can_register')): ?>
After edit if user can register, then form will be visible, but if he can’t, then form will be hidden.