/ Published in: PHP
![](/img/icon_sav.png?v3)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function get_root_category($category) { while ($category->parent > 0) $category = get_category($category->parent); return $category; }
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)
function get_root_category($category) { while ($category->parent > 0) $category = get_category($category->parent); return $category; }