DesignWall
Forum Replies Created
-
You’re welcome, my friend. =))
Forum: Plugins
In reply to: [DW Question & Answer] Suggested improvement: answer redirectionHi guys,
Thanks for writing in. We’re gradually updating the DW Question & Answer, both the free and the pro version. It will be updated roughly every 4 to 5 days according to our developer.
Please stay in touch with us so we can hear the latest feedback from you. You guys encourage us a lot. 😀
Cheers.
Hi there,
Thanks for writing in. We’re so happy that you have resolved the issue yourself. 😀
If you encounter any problem with the DW Question & Answer, please get back to us. We’re here to assist you.
Cheers.
Forum: Plugins
In reply to: [DW Question & Answer] How to extend filter ? in question archive page urlHi Prafulla Kumar Sahu,
Great to hear that.
If there is any more issue with the DW Question & Answer, please do not hesitate to get back to us. It encourages us a lot.
Hi Prafulla Kumar Sahu,
Thanks buddy. We do really appreciate your help.
If there is any more issue with the DW Question & Answer, please do not hesitate to get back to us. It encourages us a lot.
Forum: Plugins
In reply to: [DW Question & Answer] How to override answers.php template ?Hi Prafulla Kumar Sahu,
Please try this code below:
add_filter( 'dwqa-load-template', 'dwqa_replace_template' ); function dwqa_replace_template( $template, $name ) { if ( $name == 'answer.php' ) { $template = MY_PLUGIN_DIR . '/dw-question-answer/answers.php'; } return $template; }Forum: Plugins
In reply to: [DW Question & Answer] How to extend filter ? in question archive page urlHi Prafulla Kumar Sahu,
Thank you for getting in touch with us. Please try this code below here
add_filter( 'dwqa_prepare_archive_posts', 'dwqa_refilter_question' ); function dwqa_refilter_question( $args ) { if ( isset( $_GET['filter'] ) && $_GET['filter'] == 'my-answer' ) { $user_id = get_current_user_id(); $answer_args = array( 'post_type' => 'dwqa-answer', 'posts_per_page' => 5, 'no_found_rows' => true, 'update_post_term_cache' => false, 'update_post_meta_cache' => false, 'orderby' => 'date', 'order' => 'DESC', 'fields' => 'ids', 'meta_key' => '_question', 'author' => get_current_user_id() ); add_filter( 'posts_where', 'dwqa_answer_post_where' ); add_filter( 'posts_clauses', 'dwqa_answer_posts_clauses' ); add_filter( 'posts_distinct', 'dwqa_answer_post_distinct' ); $questions = new WP_Query( $answer_args ); remove_filter( 'posts_where', 'dwqa_answer_post_where' ); remove_filter( 'posts_clauses', 'dwqa_answer_posts_clauses' ); remove_filter( 'posts_distinct', 'dwqa_answer_post_distinct' ); if ( $questions->have_posts() ) { $args['post__in'] = $questions->posts; } } return $args; } function dwqa_answer_post_join( $join ) { global $wpdb; if ( isset( $_GET['filter'] ) && $_GET['filter'] == 'my-answer' ) { $join .= 'JOIN {$wpdb->postmeta} ON {$wpdb->posts}.ID = {$wpdb->postmeta}.post_id '; } } function dwqa_answer_post_where( $where ) { global $wpdb; if ( isset( $_GET['filter'] ) && $_GET['filter'] == 'my-answer' ) { $user_id = get_current_user_id(); $where .= " AND {$wpdb->postmeta}.meta_key = '_question' "; } return $where; } function dwqa_answer_posts_clauses( $clauses ) { global $wpdb; $clauses['fields'] = $wpdb->postmeta . '.meta_value'; return $clauses; } function dwqa_answer_post_distinct( $distinct ) { return "DISTINCT"; }Forum: Plugins
In reply to: [DW Question & Answer] How to extend filter ? in question archive page urlHi Prafulla Kumar Sahu,
Thanks buddy. We do really appreciate your help.
If there is any more issue with the DW Question & Answer, please do not hesitate to get back to us. It encourages us a lot.
Hello Prafulla Kumar Sahu,
Thanks for noticing us. We will implement this feature in the upcoming version of DW Q&A.
However, until then you can only use
dwqa_prepare_archive_postsfilter to change the arguments.Forum: Plugins
In reply to: [DW Question & Answer] Two small requestsHi Mr. Vibe,
Thank you for your help. We do really appreciate it.
If there is any more issue with the DW Question & Answer, please do not hesitate to get back to us. It encourages us a lot.
Forum: Plugins
In reply to: [DW Question & Answer] Not saving formated textHi guys,
How’s everything? Does DW Question & Answer work fine on your site?
If you encounter any problem, please do not hesitate to get back to us. We’re here to help you.Forum: Plugins
In reply to: [DW Question & Answer] answer box not coming in page.Hi Skumarsm1319,
How’s everything? Does DW Question & Answer look good on your site?
If you encounter any problem, please do not hesitate to get back to us. We’re here to help you.Forum: Plugins
In reply to: [DW Question & Answer] Wysiwyg css brokenHi Kashifkiduniya,
How’s everything? Does DW Question & Answer look good on your site?
If you encounter any problem, please do not hesitate to get back to us. We’re here to help you.Forum: Plugins
In reply to: [DW Question & Answer] How can I edit the 'Staff' label on answersHi Essjay88,
How’s everything? Does DW Question & Answer look good on your site?
If you encounter any problem, please do not hesitate to get back to us. We’re here to help you.Hi Prafulla Kumar Sahu,
Please read these lines below as our assistance:
You can go to
wp-content/themes/<your-theme-folder>and add this code in tofunctions.phpadd_filter( 'dwqa_prepare_archive_posts', 'dwqa_refilter_question' ); function dwqa_refilter_question( $args ) { // change 0 to page id you had place other archive page contain shortcode [dwqa-list-questions] if ( is_page( 0 ) ) { $answer_args = array( 'post_type' => 'dwqa-answer', 'posts_per_page' => 5, 'post_status' => 'publish', 'fields' => 'ids', 'no_found_rows' => true, 'update_post_term_cache' => false, 'update_post_meta_cache' => false, 'author' => get_current_user_id(), 'orderby' => 'date' ); // this will return array with 5 answer's ids $answers = get_posts( $answer_args ); $question_lists = array(); foreach( $answers as $answer_id ) { $question_lists[] = get_post_meta( $answer_id, '_question', true ); } $args['post__in'] = $question_lists; } return $args; }If you encounter any problem, please do not hesitate to get back to us. We’re here to help you.