Fixed logic for sidebar recent posts