Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
362 views
in Q2A Core by
Hello I want to make category name clickable on Categories page instead of link at number of question in that category. Is it doable? I am looking at qa-page-categories.php but it is not obivous how to do that.
Q2A version: latest

1 Answer

+3 votes
by

I have had a look into it and it looks like any category without subcategories does not link. I believe this might be because they were trying to implement a way to expand out the category to show the subcategories. I am unsure if this functionality is working. However I was able to get what you requested working with the following code:

Starting on line 60 in qa-page-categories.php I had the following code:

if (!$category['childcount'])
unset($navigation[$key]['url']);
 
I changed it to this:
 
if (!$category['childcount'])
//unset($navigation[$key]['url']);
$navigation[$key]['url']=qa_path_html('categories/'.qa_category_path_request($categories, $category['categoryid']));
 
By commenting out the unset line and adding the last line, all of my categories became links,

 

...