Home Web Development Home page new products widget in Magento 2
Home page new products widget in Magento 2 PDF Print E-mail
Written by Tom   

To display new products on Home page in Magento 2. Paste the following code in the block or home page to call new products.


{{widget type="Magento\Catalog\Block\Product\Widget\NewWidget" display_type="all_products" products_count="12" template="product/widget/new/content/new_grid.phtml"}}



If you need to change some fields on the Hompage view of products called from the widget. You will need to access the file new_grid.html located in


e.g. C:\xampp\htdocs\dmt\app\design\frontend\Venustheme\fasony\Magento_Catalog\templates\product\widget\new\content


Example if you need not to display add to cart chnage from $showCart = true;  to $showCart = false;


Below are other options

$showWishlist = true;
$showCompare = true;
$showCart = false;
$templateType = \Magento\Catalog\Block\Product\ReviewRendererInterface::DEFAULT_VIEW;
$description = false;