$whatWeWork = get_field('what_we_work');
$rows = $whatWeWork['blok_1'];
if($rows) {
echo '<ul>';
foreach($rows as $row) {
echo '<li>' . $row['what_we_work_item'] . '</li>';
}
echo '</ul>';
}
<div class="s-header__basket-wr woocommerce">
<?php
global $woocommerce; ?>
<a href="<?php echo $woocommerce->cart->get_cart_url() ?>" class="basket-btn basket-btn_fixed-xs">
<span class="basket-btn__label">Корзина</span>
<span class="basket-btn__counter">(<?php echo sprintf($woocommerce->cart->cart_contents_count); ?>)</span>
</a>
</div>
add_filter('woocommerce_add_to_cart_fragments', 'header_add_to_cart_fragment');
function header_add_to_cart_fragment( $fragments ) {
global $woocommerce;
ob_start();
?>
<span class="basket-btn__counter">(<?php echo sprintf($woocommerce->cart->cart_contents_count); ?>)</span>
<?php
$fragments['.basket-btn__counter'] = ob_get_clean();
return $fragments;
}
const grouped = productData.reduce((acc, n) => (
(acc[n.coordinates] ??= []).push(n),
acc
), {});
for (const [ coord, data ] of Object.entries(grouped)) {
const placemark = new ymaps.Placemark(
coord.split(',').map(parseFloat),
{
balloonContent: data
.map(n => `
<div>
${n.address}
<br>
<a href="${n.productURL}">Подробнее</a>
</div>`)
.join(''),
},
{
preset: 'islands#blueDotIcon',
maxWidth: 300,
}
);
map.geoObjects.add(placemark);
}
const placemarks = productData.map((n, i) => new ymaps.Placemark(
n.coordinates.split(',').map(parseFloat),
{
balloonContent: `${n.address}<br><a href="${n.productURL}">Подробнее</a>`,
clusterCaption: `Адрес №${i + 1}`,
},
{
preset: 'islands#blueDotIcon',
maxWidth: 300,
}
));
const clusterer = new ymaps.Clusterer({
clusterDisableClickZoom: true,
});
clusterer.add(placemarks);
map.geoObjects.add(clusterer);
$('.open-modal-btn').on('click', function (e) {
e.preventDefault();
var $title = $(this).parents('.cf7-item').find('.cf7-title').text();
$('#call-to-action').find('.modal-target').val($title);
var $target = $(this).attr('data-target');
openModal($target);
});
add_filter('nav_menu_css_class' , 'special_nav_class' , 10 , 2);
function special_nav_class($classes, $item){
$classes[] = 'your-custom-class';
return $classes;
}