Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
in Q2A Core by

I want to use the name of a category for a post to appear on the front browsing page of posts, not a subcategory. I'm not sure how that is possible because of the way the code seems to be constructed. For example, I have a category "Cars" and a subcategory "Audi". The post gets displayed with the subcategory "Audi" when I just want it to use the main category of "Cars" for posting.

The code that does this is in qa-app-format.php - using categoryname shows the subcategory name. The backpath shows the path/url.


if (@$options['categoryview'] && isset($post['categoryname']) && isset($post['categorybackpath']))


'<A HREF="'.qa_path_html(@$options['categorypathprefix'].implode('/', array_reverse(explode('/', $post['categorybackpath'])))).

'" CLASS="qa-category-link">'.qa_html($post['categoryname']).'</A>');

Q2A version: 1.5b2

Please log in or register to answer this question.