<li>
  <a href="<?php echo $url_blog; ?>"><?php echo $setting['title']; ?></a>
  <?php if ($categories) { ?>
    <ul>
      <?php foreach ($categories as $category) { ?>
        <li><a href="<?php echo $category['href']; ?>"><?php echo $category['title']; ?></a></li>

        <?php if (!empty($category['children'])) { ?>
          <ul>
            <?php foreach ($category['children'] as $category_child) { ?>
              <li><a href="<?php echo $category_child['href']; ?>"><?php echo $category_child['title']; ?></a></li>
            <?php } ?>
          </ul>
        <?php } ?>

      <?php } ?>
    </ul>
  <?php } ?>
</li>
