Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have tried to get all sub categories which are not include in navigation menu but those are being active, of current category in list page.

$children = Mage::getModel('catalog/category')->getCategories(10); //10 current category id

Even this category collection also return only subcategories which are include in navigation menu.

How to get category which isn't include in navigation menu?

share|improve this question

Try this:

$collection = Mage::getResourceModel('catalog/category_collection')
    ->addAttributeToFilter('is_active', 1) //only active categories
    ->addAttributeToFilter('include_in_menu', 0) //only categories not included in menu
    ->addAttributeToFilter('parent_id', 10)//get only subcategories of the category with id 10
    ->addAttributeToSort('position')//sort by position

foreach ($collection as $category) {
    //do something with $category
share|improve this answer
It also doesn't return the category which isn't not showing in menu @marius – DRAJI May 5 '14 at 8:29
@DRAJI. should. Make sure your indexes are up to date. – Marius May 5 '14 at 8:34
Sorry this also "$collection = Mage::getResourceModel('catalog/category_collection')" doesn't return those categories – DRAJI May 5 '14 at 9:55
@DRAJI. Then It might be something wrong with your category tree. Corrupted data maybe. Some values for path field might be wrong. Or parent ids may be wrong. – Marius May 5 '14 at 10:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.