I created a function in qa-base.php called qa_site_category() that returns the default category for the domain (I have multiple domains using the same db and php files). In qa-page-questions.php I changed:
...
$countslugs=count($categoryslugs);
$sort=($countslugs && !QA_ALLOW_UNINDEXED_QUERIES) ? null : qa_get('sort');
...
to:
...
$countslugs=count($categoryslugs);
// if no category/subcategory is specified in URI
if(!$countslugs) {
// get site's default category
$default_category = qa_site_category();
// if not 'All categories' site
if($default_category != '') {
// create single element array
$categoryslugs = array($default_category);
$countslugs=count($categoryslugs);
}
}
$sort=($countslugs && !QA_ALLOW_UNINDEXED_QUERIES) ? null : qa_get('sort');
...
So after making this change, I get the results I want except the submenu
Recent Hot! Most votes Most answers Most views
no longer shows up. Why? How do I fix it?