Tags for AnsPress'; return; } $tags = get_the_terms(get_question_id(), 'question_tag' ); $tags_in = array(); if($tags) foreach($tags as $t) $tags_in[] = $t->term_id; $question_args=array( 'tax_query' => array( 'taxonomy' => 'question_tag', 'field' => 'id', 'terms' => $tags_in, ), 'showposts' => 10, 'post__not_in' => array(get_question_id()), ); $questions = new Question_Query( $question_args ); include ap_get_theme_location('widget-related_questions.php'); echo $args['after_widget']; wp_reset_postdata(); } public function form( $instance ) { $title = __( 'Related Questions', 'ap' ); if ( isset( $instance[ 'title' ] ) ) $title = $instance[ 'title' ]; ?>