GET ALL CATEGORIES HACK
-
Hy to all,
I propose this change in order to properly capture the structure of the categories even when you have 3 levelsbreadcrumbs_navxt_class.php
row: 447//Now find which one has a parent, pick the first one that does
$bcn_use_term = key($bcn_object);
$aID=array();
$aPAR=array();
foreach($bcn_object as $key=>$object)
{
$aID[] =$object->term_id;
$aPAR[]=$object->parent;//We want the first term hiearchy
/*TO DELETE
if($object->parent > 0)
{
$bcn_use_term = $key;
//We found our first term hiearchy, can exit loop now
//break;
}
*/
}
/*
ID | PARENT
4 | 0
2 | 4
15 | 2
*/
$aDiff=array_diff($aID,$aPAR);
$bcn_use_term = current($aDiff);
The topic ‘GET ALL CATEGORIES HACK’ is closed to new replies.