Nathen Sample
asked 7 years ago

Question is basically the title.

As it stands there is no "ask question" button anywhere on the page when the user is not logged in – how would I go about rectifying this?


1 Answers
answered 7 years ago

At the moment, if you want to display the Ask Question button on the list question page, you can change the permission in the Dashboard > Q&A > Settings and allow all role can post a question.
Or, you can open the archive-question.php file and find around line 34.
Replace the following code:

<?php if ( dwqa_current_user_can( 'post_question' ) ) : ?>

with new code:

<?php if ( dwqa_current_user_can( 'read_question' ) ) : ?>

Hope this helps!

replied 7 years ago

Thanks – Which file would I need to modify to change the message that appears following this? I.e "Ask a Question
You do not have permission to submit a question" I want to prompt the user to create/login

dominic Staff
replied 7 years ago

To change this message, you open the template.php file in the line 1052 or use the .po/.mo file to change it.
Hope this helps!

Powered by DW Question & Answer Pro