Nagradne igre

Nagradna igra #1

global $post;
$category = get_the_category($post->ID);
$excludeCategory = getParentFoodCategory(‘jedi’);
$excludeParentId = $parent->term_id;
$rootCategories = getRootCategories(array($excludeParentId), ‘ids’);

foreach ($category as $postCat) {
    if (in_array($postCat->parent, $rootCategories)) {
            $catParID = $postCat->parent;
            $catParent = get_cat_name ($catParID);
            $currentCat = $postCat->name;
    }
}

Na seznam