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

I want to add an if (the answer!=0) {$image=lala.jpg} else $image=lalala.jpg;

how do I count $post['answers_raw'] ? I tried but i get an error.




EDIT: I managed to do it:


I won't close the question, maybe it will help other people
Q2A version: 1.5.4
The kind of page which wants to process is not described by your question.
If you want an exact answer, you should carry information in more detail.

1 Answer

0 votes
I think you can do it via css file.

There is class for styling answer when there are answer or not, you can do something like that :

.qa-a-count-zero {background-image:url(no-answer.jpg');}


and place your image via background-position