/** * Prepare posts collection * * @return void */ protected function _preparePostCollection() { $this->_postCollection = $this->_postCollectionFactory->create()->addActiveFilter()->addStoreFilter($this->_storeManager->getStore()->getId())->setOrder('publish_time', 'DESC'); if ($this->getPageSize()) { $this->_postCollection->setPageSize($this->getPageSize()); } }