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


I'm absolutely a beginner and need help.

Which PHP code snippet need I to show/display in numerical digit the sum of the current/individual answers for the "qa-theme.php"?

best regards

Q2A version: 1.7
The alternative would be to have the snipped for the raw number if it is easier for:
"qa-netvote-count-data" or "published updated" like above (1 day)

1 Answer

0 votes
The answer count is cached, so you can use the cached option:

$this->output( qa_opt('cache_acount') );
Thanks @q2apro, it works.

But I have expressed myself wrong:
I'd like to have the sum of answer in the current/individual question?
Then you need to do a mysql quere, WHERE type=A and parentid=#

# stands for the questionid.
mhh, I don't know how to do that.

But here on top I see "1 Answer" (yours), I need that code snippet for the "1" to put it on the bottom of this same question.
You need to use an advanced theme then, qa-theme.php

You find the count also in $qa_content['a_list']['title']
Sorry, I don't understand that.

It's so difficult to put the same number (ansers/total vote/creating date) on a second place in the asking page?
(I've written, that i'm a beginner...)