gcez
asked 7 years ago

Hi. Is there a way for the Categories to be made a required field?

3 Answers
DominicStaff
answered 7 years ago

You can open file wp-content/plugins/dwqa-question-answer/inc/Handle.php and add following code from line 293:

if ( !$category ) {
dwqa_add_notice( __( ‘You must choose category.’, ‘dwqa’ ), ‘error’ );
return false;
}
 if ( !is_user_logged_in() && empty( $_POST[‘_dwqa_anonymous_email’] ) && !is_email( $_POST[‘_dwqa_anonymous_email’] ) ) {
dwqa_add_notice( __( ‘You must enter a valid email.’ ), ‘error’ );
return false;
}
Dominic Staff
replied 7 years ago

If you still face their issue, you can send me username & password of your site for further checking.

gcez
answered 7 years ago

Hi Dominic,
Is this something that you guys will include in the next release? Also, shouldn’t I be modifying the file in the child theme vs. directly on the plugin code, as to prevent future overwrites when the core plugin in updated?

gcez
answered 7 years ago

Also, that code didn’t work, unfortunately. 

Dominic Staff
replied 7 years ago

At the moment, this option won’t include in the plugin. just customized the .php file in the plugin.
You can send me username & password of your site for further checking, I will help you resolve this issue.

Powered by DW Question & Answer Pro