Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
in Q2A Core by
Hello, my site is for asking questions to a group of experts, and for that I made membership only for experts,  but I want to hide the answer button for visitors, how do I do that?

2 Answers

0 votes
selected by
Best answer

Follow these steps:

1. Edit file qa-theme/<your-theme>/qa-theme.php

2. Add or merge the initialize() function below:

public function initialize() {
    if (!qa_is_logged_in() && $this->template === 'question' && isset($this->content['q_view']['form']['buttons']['answer']))

Thanks a lot, I will try it.
It worked just as I wanted it to, thank you
0 votes

Under Administration center → Permissions set "Answering questions" to "Registered users with email confirmed."

Thank you for your response, I did that but the answer button remains visible and when you press it, it asks you to register or login so I want to hide it

Welcome to the Q&A site for Question2Answer.

If you have a question about Q2A, please ask here, in English.

To report a bug, please create a new issue on Github or ask a question here with the bug tag.

If you just want to try Q2A, please use the demo site.

April 20, 2021: Q2A 1.8.6 released!