• How would I properly write this:

    If this single post is in the parent category [Articles] AND is in a child of [Articles] display [something]

    I have this

    <?php if ( in_category('Articles') && cat_is_ancestor_of(4) ) {
    	echo 'yes';
    }else {
    	echo 'no';
    }?>

    Why I’m trying to figure this out. I have a sub-categories for ‘Articles’ that display as a side navigation. If I am on a single post page where that post is in both ‘Articles’ and say ‘Reviews’ The Articles sub-nav dissapears because WordPress associates the post with two parents (or I guess grandparents). So I’m trying to see if I can get around that.

    I’ve looked at custom post types (they are pretty neat looking), but I’m not sure I need them for this. Also they have almost zilch screen options for some reason when you make them.

    Suggestions?

    Thanks!

    Nadine

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Can't get sub-menu to display / multiple category issue’ is closed to new replies.