There are two ways of disabling the sub navigation for the 'questions' page:
Method 1: Disable the 'sort' query parameter directly in qa-include/pages/questions.php by replacing this:
$sort = ($countslugs && !QA_ALLOW_UNINDEXED_QUERIES) ? null : qa_get('sort');
$sort = null;
in line 34; and then the sub-menu by replacing this:
$qa_content['navigation']['sub'] = qa_qs_sub_navigation($sort, $categoryslugs);
$qa_content['navigation']['sub'] = null;
in line 133; please have a look at 'Step 1' and 'Step 2' in this snippet , which already has these changes in place.
- Pros: Quick and easy way of getting the job done
- Cons: It'll get reverted to its initial form after updating Q2A
Method 2: Avoid modifying Q2A itself by creating a plugin and duplicate the parts you want to adjust into it.
- Create a plugin. Here's a great tutorial on how to create plugins.
- Copy the file I mentioned in Method 1 into 'my_plugin'
- Override the route 'questions/' in qa_page_routing() so that it loads the duplicate in the plugin, instead of the one in Q2A.
- Adjust the contend of the duplicate so that you can follow Method 1 in the plugin itself.
- Pros: It'll work after Q2A updates
- Cons: The plugin needs to be updated manually after Q2A updates
Have a nice day.