Hi!
Well, I’ve been digging around and I’ve found a few things that are halfway similar to what I’m trying to do here and there on the forums.
But these aren’t trying to do the exact same thing I am; and as such I am totally at a loss. Almost. Actually, I’m kinda halfway there now, as I’ve added the post_is_in_descendant_category
function and I’m using that to spit out info.
Now its just a case of getting the thing to output the subcategory’s name, and my syntax/tag knowledge forbids me this pleasure. Here’s my code for finding out whether a post is in the parent category:
<?php if ( post_is_in_descendant_category(7) ) {
echo "Bongo is in 7!";
}
else {
echo "Bongo is not in 7!";
}
?>
What I really need help with is replacing this Bongo stuff with the_category_which_is_the_descendant_of_the_parent_I_have_chosen
But that doesn’t seem to work.
Any assistance would again massively appreciated.