document.querySelectorAll('.container').forEach(n => {
const slider = new Swiper(n.querySelector('.product-slider'), {
navigation: {
nextEl: n.querySelector('.swiper-button-next'),
prevEl: n.querySelector('.swiper-button-prev'),
},
spaceBetween: 10,
});
const thumbs = new Swiper(n.querySelector('.product-thumbs'), {
spaceBetween: 5,
centeredSlides: true,
slidesPerView: 4,
touchRatio: 0.2,
slideToClickedSlide: true,
direction: 'vertical',
});
slider.controller.control = thumbs;
thumbs.controller.control = slider;
});
.active {
&::after {
content: "hello, world!!";
}
}
<a class="tabs-select__button" data-text="hello, world!!">
<a class="tabs-select__button" data-text="fuck the world">
.active {
&::after {
content: attr(data-text);
}
}
let b8 = [3, 14, 15, 92, "6", "5", "hello", 32];
function t8(arr) {
b8_res = [];
arr.filter((num, index) => {
if(Number.isInteger(num) && num % 2 === 0)
b8_res.push(index);
});
return b8_res;
}
console.log(t8(b8)); // [1, 3, 7]
pre_get_posts
установить для него значение не равное true:if( $query->is_front_page() && $query->is_main_query() ) {
$query->set( 'meta_key', 'custom_hide_post' );
$query->set( 'meta_value', 'true' );
$query->set( 'meta_compare', '!=' );
}