const breakpoint = window.matchMedia( '(min-width:992px)' );
(function() {
'use strict';
let portfolioSwiper;
const breakpointCheckerTwo = function() {
if ( breakpoint.matches === true ) {
if ( portfolioSwiper !== undefined ) {
portfolioSwiper.destroy( true, true )
}
} else if ( breakpoint.matches === false ) {
return enableSwiperTwo();
}
};
const enableSwiperTwo = function() {
document.querySelectorAll('#portfolio_slider').forEach(n => {
portfolioSwiper = new Swiper(n.querySelector('.slider-portfolio'), {
slidesPerView: "1",
spaceBetween: 30,
paginationClickable: true,
pagination: {
el: '.slider-portfolio .swiper-pagination',
clickable: true,
},
});
});
};
breakpoint.addListener(breakpointCheckerTwo);
breakpointCheckerTwo();
})();
$args = array(
'post_type' => 'bh-objects',
'posts_per_page' => 8,
'post__not_in' => array(get_the_ID()),
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'object_tag',
'field' => 'id',
'terms' => $term_id_list,
'include_children' => false,
)
),
);
$query = new WP_Query( $args );
Напиши, помогу