<?php if (get_theme_mod( 'charsoogh_category_button') != 'no') : ?>
  <?php if (get_theme_mod( 'charsoogh_category_button_style' , 'advanced') != 'advanced') : ?>
<li class="dropdown dropdown-large top-category-btn" <?php if (get_theme_mod( 'charsoogh_submit_ad_show') == 'no'){echo 'style="width:100%"';} ?>>
<a href="#" class="dropdown-toggle btn btn-primary text-caps btn-rounded btn-framed" data-toggle="dropdown"> <i class="fa fa-align-justify" aria-hidden="true"></i> <?php _e('Categories' , 'charsoogh'); ?></a>
<?php
$args = array(
'taxonomy'     => 'product_cat',
'hide_empty'   => 0,
'orderby'      => 'term_group',
'pad_counts'   => false,
'hierarchical' => true,
'title_li'     => ''
);
?>
<ul class="dropdown-menu dropdown-menu-large row">
<li class="col-sm-12">
  <ul>
      <?php wp_list_categories( $args ); ?>
  </ul>
</li>
</ul>
</li>
<?php else: ?>
<li class="top-category-btn" <?php if (get_theme_mod( 'charsoogh_submit_ad_show') == 'no'){echo 'style="width:100%"';} ?>>
<button type="button" class="btn btn-primary text-caps btn-rounded btn-framed" data-toggle="modal" data-target="#charsoogh_category_show"><i class="fa fa-align-justify" aria-hidden="true"></i> <?php _e('Categories' , 'charsoogh'); ?></button>
</li>
<?php endif; ?>
<?php endif; ?>
