google_user
asked 6 years 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 6 years 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 6 years 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 6 years ago

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

Dominic Staff
replied 6 years ago

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

google_user
replied 6 years ago

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

Dominic Staff
replied 6 years ago

You’re welcome

google_user
answered 6 years 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 6 years ago

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

Dominic Staff
replied 6 years 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