Wei Zhou
asked 7 years ago

Hi,
 
I have set up parent-child relationship for some of the categories in my forum (e.g. in the categories drop-down list), but they are not showing up in the frontend. What do I need to do?
 
Thanks

1 Answers
DominicStaff
answered 7 years ago

Please copy the template question-submit-form.php at wp-content/plugins/dw-question-answer-pro to wp-content/themes/your-theme-folder/dwqa-templates then replace the code below from

wp_dropdown_categories( array(
	'name'          => 'question-category',
	'id'            => 'question-category',
	'taxonomy'      => 'dwqa-question_category',
	'show_option_none' => __( 'Select question category', 'dwqa' ),
	'hide_empty'    => 0,
	'quicktags'     => array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' ),
	'selected'      => isset( $_POST['question-category'] ) ? sanitize_text_field( $_POST['question-category'] ) : false,
) );

to

wp_dropdown_categories( array(
	'name'          => 'question-category',
	'id'            => 'question-category',
	'taxonomy'      => 'dwqa-question_category',
	'show_option_none' => __( 'Select question category', 'dwqa' ),
	'hide_empty'    => 0,
	'quicktags'     => array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,spell,close' ),
	'selected'      => isset( $_POST['question-category'] ) ? sanitize_text_field( $_POST['question-category'] ) : false,
	'hierarchical'  => true,
) );

 

Wei Zhou
replied 7 years ago

Thank you

Powered by DW Question & Answer Pro