Roy Toledo
asked 8 years ago

On the single question page there’s no option for answering, or logging in,  how do I add it?
how do I add it?
For example: http://emotionalintelligenceproject.com/question/why
 
Thanks!

1 Answers
Allen
answered 8 years ago

Hi mate, so sorry for my late reply, well i think that you’re using the free version of DW Q&A.
In the pro version, we’ve already have that.
In free version, you can open file : dw-question-answer/templates/answers.php
replace line 25->27 with these code :

<?php if ( dwqa_current_user_can( 'post_answer' ) && !dwqa_is_closed( get_the_ID() ) ) : ?>
<?php dwqa_load_template( 'answer', 'submit-form' ) ?>
<?php elseif ( ! is_user_logged_in() ) : ?>
<div class="dwqa-answers-login">
<div class="dwqa-answers-login-title">
<p><?php printf( __( 'Please login or %1$sRegister%2$s to submit your answer', 'dwqa' ), '<a href="'.wp_registration_url().'">', '</a>' ) ?></p>
</div>
<div class="dwqa-answers-login-content">
<?php wp_login_form(); ?>
<?php do_action( 'wordpress_social_login' ); ?>
</div>
</div>
<?php endif; ?>
Roy Toledo
replied 8 years ago

Thanks!
That’s great.
BTW, what are you using for the social login integration?

Allen
replied 8 years ago

we use this plugin : https://wordpress.org/plugins/wordpress-social-login/

but any plugin could work too, you just need to put some shortcode that plugin provide .

Roy Toledo
replied 8 years ago

Awesome
Thank you!

tkwes02
replied 6 years ago

Hi there,

where can I find this “In free version, you can open file : dw-question-answer/templates/answers.php”
cant seem to find it?

Powered by DW Question & Answer Pro