ashwinisatpute
asked 6 years ago

I want to ask if there is a way to move the \\\”Ask  question\\\” button from the bottom of the page to the top of the page, specifically where the catagories are, to the right side.
from here: https://drive.google.com/open?id=1xhYKbkP0VHpNf2MLiVP4msebnBx24pSG
to here: https://drive.google.com/open?id=1cneuPOiVLEitdLn29hU1Qn6-HxwQmUHY
Thanks and Regards,
Ashwini

1 Answers
DominicStaff
answered 6 years ago

To resolve this issue, you can create a folder with name “dwqa-templates” in the folder theme and go to the plugins/dw-question-answer/templates/. Copy/paste the archive-question.php and archive-question-filter.php to the “dwqa-templates” folder then open the archive-question.php file and remove the following code in the line 27:

<?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 open the archive-question-filter.php file and add the following code under line 36. 

<div class="question-header">
<?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; ?>
</div>
Powered by DW Question & Answer Pro