<?php $arr = array('<i class="fa fa-star"></i>', '<i class="fa fa-tasks"></i>'); $i = 0; foreach ($categories as $key => $value) { ?> <li> <a href="<?php echo $value['url']; ?> "> <?php echo $arr[$i]; ?> <span><?php echo filter_products($value['name']); ?> </span> </a> </li> <?php $i++; } ?> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"> полезные ссылки
</li> <?php $args = array('post_type' => 'product'); $query = new WP_Query($args); if ($query->have_posts()) { while ($query->have_posts()) { $query->the_post(); ?> <li> <a href="<?php the_permalink(); ?> "> <?php echo filter_products(get_the_title()); ?> </a> </li> <?php } } wp_reset_query(); ?> </ul> </li> <li class="dropdown"> <a href="#"> <i class="fa fa-check"></i> полезные ссылки </a>