FIX: Hide empty popular/recent sections in 404 page (PR #10811)

Currently we show this on a 404 in a fairly new site: image

This PR hides Popular/Recent sections if they are empty.

GitHub