Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Hide button under category

+3 votes
59 views
asked Feb 13 in Q2A Core by Dmytro Pastovenskyi

I would like to hide/delete a button that is displayed under our category (see screen below).

How would I do that?

Q2A version: 1.5.3

1 Answer

+3 votes
answered Feb 13 by pupi1985
selected Feb 14 by Dmytro Pastovenskyi
 
Best answer

The appropriate way to do this would be by creating a plugin that overrides the qa_html_suggest_ask() function.

If this is too complex then you can follow these steps:

1. Locate this line: https://github.com/q2a/question2answer/blob/4fce0eb2390f56b645dad375d1d81e9f91a97e69/qa-include/app/format.php#L1186

2. Exactly in that point add the following code:

if (isset($categoryid)) {
    return '';
}

...