[Resolved] Category parent shows after sub-category
Unfortunately my problem exists on my localhost so I can’t forward you to the website.
Check the following screenshots. ‘design’ is a parent of ‘work’ same as ‘Travel’ is a parent of ‘New Zealand’
I’m using this code:
$category = get_the_category();
$wut = $category->cat_name;
to pull the parent category.
‘New Zealand’ (or any sub-category of ‘travel’) gets returned with 0 whereas it should be the parent, ‘travel’ that gets returned. Is there anyway to change the order? Why is it wrong to begin with?
- The topic ‘[Resolved] Category parent shows after sub-category’ is closed to new replies.