Forums

[resolved] Category depth function with get_categories (4 posts)

  1. patricia1706
    Member
    Posted 2 years ago #

    On a parent category archive page - I want to have a listing of child level categories only (not grandchild, or great grad child - so a depth of 1), with the category description below. I'm using this PHP function for that:
    <div class="cat-display">

    </div>

    But I don't know how to limit the depth to 1 - can anyone help?
    the URL in question:
    http://www.artbrain.org/category/journal-neuro-aesthetic-theory/

    Thanks!

  2. shahar
    Member
    Posted 2 years ago #

    Have you tried parent=3 in this line?
    $categories=get_categories('parent=3');

  3. patricia1706
    Member
    Posted 2 years ago #

    Wow, super, that was an easy fix, thanks so much for your help andquick reply!

  4. shahar
    Member
    Posted 2 years ago #

    my pleasure :D

Topic Closed

This topic has been closed to new replies.

About this Topic