Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
578 views
in Q2A Core by
Is there a way to output the total number of questions and answers in my wordpress theme.

I would like to have on the sidebar of my (Blog) a widget like "activity-count-widget". Is it possible?

Thanks in advanced

1 Answer

0 votes
by

Probably the easiest way is to simply run a SQL query like this, using the native MySQL functions.

SELECT COUNT(*) FROM qa_posts WHERE type='Q'

Alternatively, you can access Q2A outside of Q2A using the code here. You should be able to run a query using the function qa_db_query_raw.

...