Peter Davenport
asked 10 years ago

I have a need to use the template file single-dwqa-question.php to handle the templating of my single questions pages. I have some stuff on my single.php that is appropriate for single blog posts on the site, but not for single question pages. I created single-dwqa-question.php based on the standardized rules for WordPress template hierarchy. However, single questions continue to be displayed using single.php.

 

I have it working fine with another custom post type, but that CPT uses and underscore instead of a hyphen in the custom post type name. I’m wondering if that has something to do with it. Hiding the extra content via CSS is not the preferred way to handle this and I would rather do it through WP’s templating system.

 

Can you please advise on this?

Yao Fong Chow
replied 10 years ago

I am facing the same problem.

Both the question list and ask question page style can be controlled from the page setting.
Why not the single question page to the same?

Please advise

2 Answers
Scott Petrovic
answered 5 years ago

For the PRO version…
I just got it this override working with the paid version of the Q&A Plugin. I had to put the files in a slightly different directory as the files for that are in a different location.
<theme directory>/dwqa-templates/styles/default
I put the “content-single-question.php” in there and it seems to be overriding fine.
 

Dominic Staff
replied 5 years ago

With the Free version you can copy/paste the file in the to the /dwqa-templates.
About the content-single-question.php file, you can add to the folder.

pons
answered 4 years ago

Hi,
Iam using twentyseventeen theme and i want to change the content-question.php file. I am overwriting this file in my theme folder. twentyseventeen/dwqa-templates/styles/default/content-question.php but this file is not overridden. Please help me to resolve this issue
 

Dominic Staff
replied 4 years ago

Please check the style that you selected in the Dashboard > Questions > Settings > General. If you use another style, you need to rename the twentyseventeen/dwqa-templates/styles/default/ folder to the style that you are using.
– Default: twentyseventeen/dwqa-templates/styles/default/
– Flat: twentyseventeen/dwqa-templates/styles/flat/
– Helpdesk: twentyseventeen/dwqa-templates/styles/helpdesk/

Powered by DW Question & Answer Pro