Support » Fixing WordPress » Get Category Children

  • How to do I get the children of this category to be listed in the unordered list I have below?

    <?php $categories = get_categories('orderby=name&depth=1&title_li=&use_desc_for_title=1&child_of='); foreach ($categories as $cat) { ?>
    			<dt><a href="#"<?php if ($cat->slug == 'photos') {?> class="customer-acquisitiontop" <?php } else {?>class="customer-acquisitiontop" <?php }?>id="<?php echo $cat->slug; ?>" data-filter=".<?php echo $cat->slug; ?>"><h2><?= $cat->cat_name; ?></h2></a></dt>
    			<dd class="services">
    				<ul class="row">
    					<li class="<?php echo $cat->slug; ?>">
    					</li>
    				</ul>
    			</dd>
    			<?php } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get Category Children’ is closed to new replies.