how to show the description of sub-categories magento

how to show the description of sub-categories magento

September 28, 2026 · Illustrated author avatarBy Stefan Bogdanescu
how to show the description of sub-categories magento

Displaying Sub-Category Descriptions in Magento

In Magento, displaying sub-category descriptions alongside their names and images on the main category page involves a few key steps. Let’s walk through the process of achieving this using your existing phtml file.

Step 1: Understanding the Current Setup

Your current phtml file retrieves active child categories using $this->getCurrentChildCategories(). It then loops through these sub-categories and displays their names, images, and descriptions in a table format. However, you’re facing an issue with displaying the description for each sub-category.

Step 2: Locating the Description Field

The description field is indeed available in the category data. You can access it using $_category->getDescription(). This line of code should fetch the description content and output it on your page:

<?php echo $this->htmlEscape($_category->getDescription()) ?>

Step 3: Troubleshooting the Description Issue

If this line is not displaying the expected results, let’s troubleshoot a few potential issues:

1. Category Description Not Set: Ensure that each sub-category under your main category has a description set in the Magento admin panel. If the descriptions are empty or missing, $_category->getDescription() will return an empty string.

To check this:

  • Log into your Magento admin interface.
  • Navigate to Catalog > Categories.
  • Select the relevant main category.
  • Click on the “Categories” sub-tab under your main category.
  • Ensure each sub-category has a description in the “Description” field.

2. Incorrect File Path or Block: Verify that the phtml file is correctly referenced from a static block and assigned to the appropriate CMS page.

For example, if you have created a new static block:

  • Navigate to Content > Blocks.
  • Find your block (e.g., “Sub category description block”).
  • Ensure “Block Reference” matches the exact path of your phtml file, e.g., category_page_view.
  • Verify that this block is assigned to the main category page in the CMS layout update XML.

Step 4: Best Practices for Category Descriptions

For improved SEO and user experience:

  • Keep your sub-category descriptions concise yet informative. Avoid keyword stuffing.
  • Use proper formatting, including headings (<h2>, <h3>) if needed, to structure your content.
  • If the description is too long, consider using a “Read more” link that opens in a modal or redirects to a dedicated page.

Conclusion

Displaying sub-category descriptions alongside their names and images on the main category page is a common requirement in Magento. By following the steps outlined above—verifying the presence of descriptions, checking file references, and ensuring correct formatting—you should be able to resolve this issue.

Remember, maintaining consistent and informative descriptions across all your categories helps improve navigation and relevance for both users and search engines.

For more advanced customizations and development tips, feel free to explore our Magento Development Services at Laravel Company.

Catalog Database Themes Admin

Our network