Magento – Magento 2: How to show New Products in a particular Category

admin-panelcategorymagento-2.1magento2xml

I have a category named NEW and I want to show all new products in this category (filter by Set Product as New From To attribute), how can I do that?

Thank you.

Best Answer

  1. Create a new static block from admin.
  2. Insert widget in a static block.
  3. Select Catalog New Products List in widget type.

OR you can simply paste below code in your static block content

<p>{{widget type="Magento\Catalog\Block\Product\Widget\NewWidget" display_type="all_products" products_count="10" template="product/widget/new/content/new_grid.phtml"}}</p>
  1. Go to your New category > Display mode and set Static block only.
  2. Go to your New category > Content and Add CMS Block which we have created in step 1.
Related Topic