Get parent categories in an Array – only php
-
is there anyway to get the parents of category in an array, so that it can be displayed as a list? using only php or wp builtin functions?
something like:
$parentarray = get_category_parents( $cat, TRUE, "" ); foreach ( $parentarray as $postparent ){ echo "<li> ". $parentarray ."</li>"; }
above code doesnt work. anybody got a workaround?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Get parent categories in an Array – only php’ is closed to new replies.