sword024
asked 4 months ago

Hi there,
When somebody isn’t logged in I want to show this warning “You do not have permission to ask questions” as on question page when want to ask questions. How I can do it? So instead of this https://prnt.sc/ZhuwUaK5tUCW to show https://prnt.sc/kInZ-SCIcXak just with different warning a lil bit.
 

sword024
replied 4 months ago

Any answer please?

Dominic Staff
replied 4 months ago

You can create the dwqa-templates/styles/default folder in your theme folder then copy/paste the content-none.php file from the wp-content/plugins/dw-question-answer-pro/templates/styles/default folder into dwqa-templates/styles/default. and now you open this file to edit.

1 Answers
DominicStaff
answered 3 months ago

At the moment, the plugin does not support this option. However, you can custom the wp-content/dw-question-answer-pro/inc/Permission.php file and then find line 375
Replace this code: return false;
With the following code:

        header("Location: http://example.com/");
        /* Make sure that code below does not get executed when we redirect. */
        exit;

Note: You can create a page to show your notice.

Powered by DW Question & Answer Pro