Ejaz Ahmed
asked 6 years ago

Hi , i am using your superb QnA plugin for my website and I want to know can i create a child theme for it. If yes, then how?
Thanks,

Randy Brown
replied 6 years ago

*subscribing

CatsAreGods
replied 6 years ago

Find “Child Themify” plugin on WordPress.org, it does it automatically.

Mike Burgess
replied 6 years ago

following

1 Answers
Kido D
answered 6 years ago

Hi there,
Currently, you can create a template for DW Q&A based on WordPress child theme, so you may want to check out this link: https://codex.wordpress.org/Child_Themes
Basically, here is the instruction to create a template for DWQ&A:
1) Follow the guide in the link above to create a WP child theme.
2) Go to your child theme folder, and create a new folder, named it dwqa-templates. Inside your new folder, create the style.css file.
3) Go to plugins/dw-question-answer/inc/templates/default folder, and copy all the .php files in that folder to the dwqa-templates folder that you created above.
4) Open up the functions.php file in your child theme folder, and add the code below to bottom of the file:

/* load style for DW Q&A plugin */
if( !function_exists('dwqa_tmpl_scripts') ){
function dwqa_tmpl_scripts(){
wp_enqueue_style( 'dwqa-tmpl', get_stylesheet_directory_uri() . '/dwqa-templates/style.css' );
}
add_action( 'wp_enqueue_scripts', 'dwqa_tmpl_scripts' );
}

5) After 4 steps above, you can now edit both the .php file and the style.css file in dwqa-templates folder as you want without any effect on the Q&A plugin.
Hope this helps!

Powered by DW Question & Answer Pro