ashwinisatpute
asked 7 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 7 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>
Jenny In Wanderland
replied 6 years ago

Could you be more specific (from top of directory structure) of where the “folder theme” folder is to put the new dwqa-templates folder? Thank you!

Dominic Staff
replied 6 years ago

If you are using the Pro version, you can download the following folder then add to the theme folder.
https://www.dropbox.com/s/2g0fywfvub971er/dwqa-templates.zip?dl=0
Then copy/paste the template file that you want to custom into the my-style folder

Powered by DW Question & Answer Pro