Hide Posts section when the collection is empty

Encapsulate accordion section-related logic