Hello,
I have searched the questions here but can’t seem to find a way to do this.
I used the shortcode [dwqa-list-questions category=”slug”] to display questions from a particular category in a sidebar. The shortcode does exactly what it promises, but because it is in a sidebar, it doesn’t display correctly as it shows the question filters, search, sorting and stats all on the sidebar and it doesn’t look good.
I was wondering if it is possible to remove all those elements, leaving just the questions. It would be nice to have a display on the sidebar like that of the widgets, “Popular Questions” or “Latest Questions”.
Please your assistance will be appreciated. Thank you
You can use the following code:
.dwqa-question-filter, input.ui-autocomplete-input, .dwqa-sort-by, .dwqa-question-stats,
.dwqa-questions-list .dwqa-question-item .dwqa-question-meta {
display: none;
}
div.dwqa-questions-list .dwqa-question-item {
padding-left: 15px;
}
Thanks a lot for the response. The code worked well on the sidebar without the filters and other elements. However, the filters are also removed on the main questions page. Please, I want to retain those elements on the main questions page and have them removed on the sidebar only. Is this achievable?
Could the tweak be applied to just the shortcode which I used on the sidebar?
Yes, We are checking and help you via Live Chat.
Thanks a lot, Dominic. Your support is top notch. The issue is solved now
You’re welcome
This is really strange. The code worked for some days and stopped working without me making any changes to my files.
Could you help me look into this please?
I moved the code to the stylesheet of the child theme, and the problem is resolved now. Thanks a lot
If you have any issue or question, you can let me know. We will check and help you resolve the issues.
Please login or Register to submit your answer