How to display featured product in home page using magento?

How to display featured product in home page using magento?

August 12, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How to display featured product in home page using magento?

In Magento, you can easily create an “featured” attribute set for products and display those featured products on your homepage. Here’s a step-by-step guide to achieve this:

First, let’s create a new attribute called ‘Featured’.

  1. Navigate to Admin Panel > Catalog > Attributes.

  2. Click on Add New Attribute.

  3. Enter Attribute Code: featured

    • Set Scope: Global
    • Choose Data Type: Yes/No
  4. In the Input Validation for Store Owner section:

    • Set Is Required to be Filled Out (for Store Owner): No
  5. Click on Save Attribute.

Now, add this new “featured” attribute while creating or editing a product.

  1. Navigate to Admin Panel > Catalog > Manage Products.

  2. Create/Edit your desired product.

  3. In the Product Details section:

    • Scroll down to the Custom Design tab.
    • Look for the Featured dropdown and set it to Yes if you want this product to be featured.
  4. Click on Save Product.

To display these featured products on your homepage, you’ll need to create a custom block in Magento and use it in your theme’s home page layout XML file.

  1. Create the Custom Block:

    • Navigate to Admin Panel > Widget > Widget Instance.

    • Click on Add New Widget.

    • In the Widget Type dropdown, select Magento_Catalog > Catalog Products List.

    • Set Title: Featured Products

    • Choose Store View: All Stores or your desired store view

    • Under Widget Options:

      • Set Sort Order By: Position
      • Set Position to Sort By: 0
    • Click on Save Widget.

  2. Use the Custom Block in Homepage Layout XML File:

    Open your theme’s home page layout XML file, usually located at app/design/frontend/[package]/[theme]/Magento_Theme/layout/default.xml.

    Add or update the following code within the <referenceContainer name="content"> tag:

    <block class="Magento\Catalog\Block\Product\NewProducts" template="catalog/product/new.phtml">
        <action method="setFeaturedOnly">
            <argument name="featured" xsi:type="string">1</argument>
        </action>
        <action method="setCategoryId">
            <argument name="category_id" xsi:type="number">0</argument>
        </action>
    </block>
    

This will display all featured products on your homepage.

Visit your store’s frontend, and you should now see a section dedicated to “Featured Products”.

Conclusion

Following these steps allows you to easily create an “featured” attribute set for Magento products and display them prominently on your homepage. This is particularly useful for highlighting special promotions or best-selling items.

Remember, if you need further assistance with customizing your e-commerce store, check out our comprehensive guide on Magento Development Services at Laravel Company. Our team of expert Magento developers can help you implement advanced features and optimize your store for better performance.

Catalog Themes Admin CLI

Our network