asked 6 years ago

How can i place a button “ask a question” in the top of my page?

1 Answers
answered 6 years ago

To resolve this issue, you can create a folder in the theme folder with the name \”dwqa-templates\” then copy the archive-question.php file in the plugins/dw-quesiton-answer-pro/templates/styles/default folder 
and paste into the dwqa-template folder.
Then open this file add the following code bellow line 14 or 16.

		<div class="dwqa-questions-footer">
			<?php dwqa_question_paginate_link() ?>
			<?php if ( dwqa_current_user_can( 'post_question' ) ) : ?>
				<div class="dwqa-ask-question"><a href="<?php echo dwqa_get_ask_link(); ?>"><?php _e( 'Ask Question', 'dwqa' ); ?></a></div>
			<?php endif; ?>

Then use the following class to add the style for the ask question top.

.ask-question-top .dwqa-ask-question {
    float: right;
Powered by DW Question & Answer Pro