asked 3 years ago

I want to disable private questions to create a fully public QA forum.
After disabling “Allow members to post private question”, the New-Question-Form correctly hides the visibility option. However, the Answer-Form still displays the visibility option to logged in members.
The problem is in the template answer-submit-form.php, in line 32: The condition only checks the log-in state but ignores the “enable-private-question” flag.
Hopefully, you can update the template soon 🙂 Awesome plugin 👍 

2 Answers
answered 3 years ago

In this case, you can remove the following line code:

<option value="private"><?php _e( 'Only Me &amp; Admin', 'dwqa' ) ?></option>


<?php if ( is_user_logged_in() ) : ?>
        <select class="dwqa-select" name="dwqa-status">
            <optgroup label="<?php _e( 'Who can see this?', 'dwqa' ) ?>">
                <option value="publish"><?php _e( 'Public', 'dwqa' ) ?></option>
                <option value="private"><?php _e( 'Only Me &amp; Admin', 'dwqa' ) ?></option>
<?php endif; ?>

Hope this help!

answered 3 years ago

Hi Dominic,
Thanks for your response/confirmation. I’ve already adjusted the template file, but wanted to report that bug, so you can address it in a future update.
Have a great day 🙂

Dominic Staff
replied 3 years ago

Okay, I sent and notified to our technical team about this issue, we will check and update it as soon as possible.

Powered by DW Question & Answer Pro