Get the children of the parent category
I'm trying to get all the children categories to display in this loop but I'm struggling with the code. This is what I have so far.
?php $args=array('orderby' = 'name', 'order' = 'ASC');
$categories=get_categories($args);
foreach ($categories as $cat) { ?
dta href="#" class="customer-acquisitiontop" id="?php echo $cat-slug; ?" data-filter=".?php echo $cat-slug; ?"h2?= $cat-cat_name; ?/h2/a/dt
dddiv class="services"
?= $categories=get_categories('parent'); ? /*This should be the children of the parent category */
/div
/dd
?php } ?
Any help would be great
Topic children navigation loop categories Wordpress
Category Web