<div class="blog-module blog-category g-hidden-xs-down">
<h3 class="h5"><?php echo $heading_title_category; ?></h3>
<?php if (!empty($categories)) { ?>
<ul class="list-unstyled g-font-size-13 mb-0">
<?php foreach ($categories as $category_1) { ?>
   <?php if ($category_1['category_1_id'] == $category_1_id) { ?>
     <li class="open active"><a class="d-block active u-link-v5 g-color-black g-bg-gray-light-v5 g-font-weight-600 g-rounded-50 g-px-20 g-py-8" href="<?php echo $category_1['href']; ?>" ><i class="mr-2 fa fa-angle-right"></i><?php echo $category_1['name']; ?></a>
      <?php } else { ?>
      <li><a class="d-block u-link-v5 g-color-gray-dark-v4 rounded g-px-20 g-py-8" href="<?php echo $category_1['href']; ?>" ><i class="mr-2 fa fa-angle-right"></i><?php echo $category_1['name']; ?></a> 
      <?php } ?>
      <?php if ($category_1['children']) { ?>
      <div class="sign"><i class="fa fa-plus"></i><span class="fa fa-minus"></i></div>
      <ul>
      <?php foreach ($category_1['children'] as $category_2) { ?>
      <li class="open active"><a class="d-block active u-link-v5 g-color-black g-bg-gray-light-v5 g-font-weight-600 g-rounded-50 g-px-20 g-py-8" href="<?php echo $category_2['href']; ?>"> <i class="fa fa-long-arrow-right"></i><?php echo $category_2['name']; ?></a></li>
      <?php } ?>
      </ul>
      <?php } ?>
    </li>
    <?php } ?>
</ul>
<?php } ?>
</div>
<script>        
	$('.blog-category li').bind().click(function(e) {
	$(this).toggleClass("open").find('>ul').stop(true, true).slideToggle(500)
	.end().siblings().find('>ul').slideUp().parent().removeClass("open");
	e.stopPropagation();
	});
	$('.blog-category li a').click(function(e) {
	e.stopPropagation();
	});
</script>