correct bg menus
This commit is contained in:
@@ -25,11 +25,14 @@ array_push($categories, $firstElement);
|
||||
$icon = get_field('icon', 'category_' . $cat->term_id);
|
||||
$bg_image = get_field('bg_image', 'category_' . $cat->term_id);
|
||||
|
||||
$class = in_array($cat->term_id, $current_term_ids) ? 'is-active' : '';
|
||||
if($bg_image){
|
||||
|
||||
echo "<a href='" . get_category_link($cat->term_id) . "' class='menu-vertical__item " . $class . "'>
|
||||
$class = in_array($cat->term_id, $current_term_ids) ? 'is-active' : '';
|
||||
|
||||
echo "<a href='" . get_category_link($cat->term_id) . "' class='menu-vertical__item " . $class . "'>
|
||||
<span class='menu-vertical__item-icon'><img src='" . $icon . "' alt=''></span>
|
||||
<span class='menu-vertical__item-text'>$cat->name</a></span>
|
||||
</a>
|
||||
";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user