Hello,
I placed the “DWQA Related Questions” widget in my sidebar.
However, for the case when there are no related questions, only the title of the widget shows.
I would like (and I think it would make sense for this to be the default) to have the widget not show at all if there are no related questions.
How can I do this?
Thank you.
You can go to wp-content/plugins/dw-question-answer/inc/Posts/Question.php
, at the line from 52 to 62 then change the code like this link.
https://gist.github.com/oryc9x/8c72313f8e4aa9590c721de4e27d0120
Thank you, I will test this out and let you know if there is a problem.
Thanks a lot for this answer Kevin and sorry for the delay in response.
In my opinion it will be better if the widget isn't shown at all (ie: no title and no space taken up in the sidebar).
Thank you
For now, I used a "Widget Logic" plugin
and then only show the "related questions widget" if `!empty(dwqa_related_question($instance_id = false, $number=5,$echo=false))'
Let me know if you have a better suggestion.
Thank you for your help.
Please login or Register to submit your answer