Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
in Q2A Core by
Thanks a lot Ada Donie Abdullah
yup ur welcome (y)
Hi  @Bruno Vandekerkhove when I activate your plugin see 500 error and error log page message I share

[18-Nov-2017 10:41:10 UTC] PHP Warning:  require_once(/home/boyco/public_html/beta/qa-plugin/q2a-hide-category/qa-hide-category-functions.php): failed to open stream: No such file or directory in /home/boyco/public_html/beta/qa-include/qa-base.php(723) : eval()'d code on line 25
[18-Nov-2017 10:41:10 UTC] PHP Fatal error:  require_once(): Failed opening required '/home/boyco/public_html/beta/qa-plugin/q2a-hide-category/qa-hide-category-functions.php' (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/boyco/public_html/beta/qa-include/qa-base.php(723) : eval()'d code on line 25
@suis Is qa-hide-category-functions.php in that directory?

1 Answer

+1 vote

Thanks a lot Bruno Vandekerkhove for make a plugin for solve this problem. 

I am not a professional developer but i try to solve the problem another way.

first time i clone and add a page /qa-include/app/q-list.php to /qa-include/app/a-q-list.php

after that i add

                if($fields['raw']['categoryid'] != 66)
                $qa_content['q_list']['qs'][] = $fields;

by replace 

               $qa_content['q_list']['qs'][] = $fields;

on    /qa-include/app/a-q-list.php

after that i edit activity page /qa-include/pages/activity.php

require_once QA_INCLUDE_DIR.'app/q-list.php'; to require_once QA_INCLUDE_DIR.'app/a-q-list.php';

Then I able to remove my category question from the activity page. My category id was 66

It is not a good way
1. It is a core hack- requires change for every core update, possible issue with plugins.
2. It is actually hiding the question from the list- suppose 20 questions are from category 66 I suppose the activity page will be mostly empty
Happy to say and tell that i am not professional. I am on study mode. This is core hack but it works and i check that activity page shows the number of questions that i set on /admin/lists
Thanks for your comment :)
oh, you mean even after hiding some questions, the number of questions is correct on the Activity page? Then I have to see the page code, because on other question listings that is not the case, may be for activity it is different.