google_user
asked 1 year ago

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

Question Tags:
2 Answers
DominicStaff
answered 1 year ago

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;
}
google_user
replied 1 year ago

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?

google_user
replied 1 year ago

Could the tweak be applied to just the shortcode which I used on the sidebar?

Dominic Staff
replied 1 year ago

Yes, We are checking and help you via Live Chat.

google_user
replied 1 year ago

Thanks a lot, Dominic. Your support is top notch. The issue is solved now

Dominic Staff
replied 1 year ago

You’re welcome

google_user
answered 1 year ago

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?

google_user
replied 1 year ago

I moved the code to the stylesheet of the child theme, and the problem is resolved now. Thanks a lot

Dominic Staff
replied 1 year ago

If you have any issue or question, you can let me know. We will check and help you resolve the issues.

Powered by DW Question & Answer Pro