WordPress.org

Ready to get started?Download WordPress

Forums

calling categories (2 posts)

  1. ronchicago
    Member
    Posted 4 years ago #

    i already have 60+ categories and that should not change except category (24). my category.php is set up to call categories by naming each category via an array below...

    <?php $this_category = get_category($cat);
    // echo $this_category->cat_ID; ?>
    <?php if ( is_category(array(212, 255, 258, 251, 252, // products
                                 2232, 2233, 2234) //designers )) ?>

    with this setup, every time i add a category i am adding an ID to the array. i now expect to add a large # of children (designers = 2232, 2233, 2234) to a parent category (designer = 24). is there a syntax like childof= for the designer (24) category ? not sure how to write with current setup.

  2. ronchicago
    Member
    Posted 4 years ago #

    tried this but getting an error = parse error: syntax error, unexpected '=', expecting ')'...

    <?php if ( is_category(array(212, 255, 258, 251, 252&childof=24)
     )) ?>

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags