kyleafly
asked 6 years ago

I see the pages for Questions and Ask Question but how can I assign a template to the Single Question page? I need a custom template here because I need some custom styles on my QA pages.
 
Thank you!

3 Answers
DominicStaff
answered 6 years ago

In this case, you can find here for the document guide on how to override the template files: https://www.designwall.com/guide/dw-question-answer-plugin/style-integration/
Then copy the single-content-question.php file from the dwqa-question-answer/templates/default folder  to dwqa-templates to edit the single content question. 

At the moment, the plugin auto get the single.php file from your site, you can not assign a page template to the single question page.

Alexandru O
replied 6 years ago

Hi,
We are using DW Question Answer Pro. Your answer is not consistent with the version we are using. The location /wp-content/plugins/dw-question-answer-pro/templates does not contain any php template files. Is maybe the location you are referring this one: /public/wp-content/plugins/dw-question-answer-pro/templates/styles/default ?

I am trying to create a template for a single question page because, as you have already seen in several question, there is a problem in this direction. Not even the “pro” version of the plugin does not offer the possibility to edit how questions are displayed when clicked on.

Thank you.

DominicStaff
answered 6 years ago

Hi @Alexandru O 
In the pro version, we have provided an option to select the styles in the Dashboards > Questions > Settings. See the screenshot: http://prntscr.com/kgvb38
So, To override and create new styles, you can create a styles folder in the dwqa-templates and in the styles folder, you create another folder is your styles.
E.g: I created a folder, named “your-style”
See the screenshot: http://prntscr.com/kgvdtl

Then go to the wp-content/plugins/dw-question-answer-pro/templates/styles/default folder to copy the template files that you want to override then paste into the your-style folder.

Alexandru O
answered 6 years ago

Hello,
I knew about that setting. The style included is alright. Maybe I was not very clear about what I want. By “trying to create a template for a single question” I meant that I want to be able to customize how the page where a single question is opened looks like. More specific, I have already created a sidebar for the question-list page. I want that sidebar to appear in every “single question page”. The present behavior is that when people click on one question, a separate page is opened but in this separate page, the loaded sidebar is the one that can be found on my site’s blog, NOT the one that I have created specifically for the dwqa module.
Hoping that I have now better expressed my problem, please take time to post an answer. Thank you very much.

Dominic Staff
replied 6 years ago

I know what you want. To resolve your issue, the best solution is you can customize the single question and insert the sidebar of the question list into the single question page.
You can get the solution in the previous answer.
Hope this helps!

Powered by DW Question & Answer Pro