If you have add product review and rating and approved admin side. After you have seen on recently view product.


1 Answer 1


Add cms_index_index.xml in vendor/module/view/frontend/layout/cms_index_index.xml

then add the following code to the xml

<?xml version="1.0"?>                                                     
 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceContainer name="content">
        <block class="Magento\Framework\View\Element\Template" name="test" template="vendor_module::home_page.phtml"></block>

Create home_page.phtml on vendor/module/view/frontend/templates/home_page.phtml

then add the following code to the phtml

<?php echo $this->getLayout()
  • but it can be done via cms block, but programmatically? my patches render the page in blocks so that the client could swap the page Commented Sep 23, 2019 at 12:51
  • this code for programatically add widget on home page. Commented Sep 23, 2019 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.