2026 Executive BenchmarkMid-Market Enterprise Modernization: How leaders across unify Commerce, Odoo ERP & AI in 90 days.
MAGENTO COMMERCE

Get category name in a custom product list on homepage

In all magento store mostly we show any category products …

Akshar Group Technologies
Dec 25, 2020
1 min read
Verified Source

In all magento store mostly we show any category products list at home page. for that purpose we use list.phtml file or any custom file to show product list at home page using following block:

{{block type="catalog/product_list" category_id="3" template="catalog/product/list.phtml"}}

This block only show products list on home page, but it don't show category name. For showing category name with that products list we need to add following code into list.phtml or any custom file you are using.

1. Go to app/design/frontend/default/your_theme/template/catalog/product and open list.phtml then paste following code :

load($this->getCategoryId())->getName(); ?>

2. Now relaod your store home page, you will see category name there.

3.Done.

Share this playbook
LET'S BUILD WHAT'S NEXT

What's Holding Your Business Back?

Tell us where you want to go, what's getting in the way, and we'll help you figure out the technology to get there.

No sales pitch. Confidential strategic advisory.