Forum Replies Created

Viewing 1 replies (of 1 total)
  • If all you want is a quick fix and your problem is limited to being able to include children of a parent category when testing for is_category(), you could do this:

    Check functions.php inside /wp-includes/ and around line 1295 you’ll see the function that actually does the is_category test. It begins:

    function is_category ($category = '') {

    and then proceeds to do a number of tests. I added one more test:


    else if ($category == $cat_obj->category_parent) {
    return true;
    }

    That way, I can have a conditional tag that will result in “true” if a post or posts are either in a category or in a child of said category.

    This may not be of use to you, but, after lurking on these boards for too long, I thought I’d start sharing some of the things we’ve been doing to get around the understandable limitations of this Blog-turned-CMS called WordPress.

Viewing 1 replies (of 1 total)