sahilmehta
asked 7 years ago

Hi!
I like the way you have shown reviews and questions at the end of every page  / post

DW Question & Answer


I wish to do the same. I have technical knowledge and would require some assistance if you can help me to use this plugin and show latest questions at the end of every normal blog post or page.
Lets say i am running a woocommerce store and after every product i want to display its questions

1 Answers
BigHug
answered 7 years ago

Hi sahilmehta,
Thank you for using our plugin for your website.
About the latest question you can use question tag or question category to separate each questions then use default query of WordPress to get posts:

 $the_query = new WP_Query( 'post_type=dwqa-question&posts_per_page=5&dwqa-question_tag=question_tag&dwqa-question_category=question_category' );

post_type=dwqa-question (require):   The name of post type we use to store question
posts_per_page: number of posts
dwqa-question_tag (optional):  the tags of questions
dwqa-question_category (optional): the categories of question

Please let we know if it works
Regards,
Rambu

sahilmehta
replied 7 years ago

Ya i already got this working before your revert. Anyways thanks for your revert. I am using more details than the above which includes complete code to display questions.

The issue that i am facing now is how to show a unique code below the posts in which i want to show their questions. Should i use something like single-postid and display relevant questions below that ?

Like your case, you are showing relevant questions of that theme below that particular theme.

BigHug
replied 7 years ago

Did you try to reset your query after get questions ( wp_reset_query ) ? You will enable to get your default post in single page 🙂

sahilmehta
replied 7 years ago

You are not getting my query.

lets say i am creating the same page – http://cmspioneer.com/designwall/wordpress/plugins/dw-question-answer/
and i want to show my same plugin questions on this page… instead of all questions of all categories

I know how to create this code and to call query refering to this plugin category. but where to insert this code. if i insert in page.php or single .php it will show on all pages. I want to show on particular this page.

BigHug
replied 7 years ago

You can make a custom page template http://codex.wordpress.org/Page_Templates guide here, and put your code in this file.

Bhushan Patil
replied 6 years ago

Hi.. I want to do the same. I don’t have much technical knowledge. Currently I am using Minion wordpress theme and want to create question answer website. I want to integrate my questions with the post. i.e. all the questions should look like and treat like posts. Hope you got my point. Can you please tell me the necessary modifications

Dominic Staff
replied 6 years ago

Apologies for the delay in replying to you. At the moment, DW Q&A only support display on the Pages.

Powered by DW Question & Answer Pro