const getSpecificImage = (breakpoint) => {
switch (breakpoint) {
case 1200:
return <Image src="https://google.com?v=1200" />;
case 600:
return <Image src="https://google.com?v=600" />;
default:
return <Image src="https://google.com?v=default" />;
}
};
const breakpoint = window?.innerWidth;
const imageElement = getImageSpecificImage(breakpoint);
return (
<>
{imageElement}
</>
);
const li = document.querySelector('#id-li')
const input = li.querySelector('input')
'category_name' => 'remont'
'relation' => 'AND'
, чтобы получить записи входящие в два разных термина:$query = new WP_Query( [
'tax_query' => [
'relation' => 'AND',
[
'taxonomy' => 'category',
'field' => 'slug',
'terms' => 'remont'
],
[
'taxonomy' => 'post_tag',
'field' => 'slug',
'terms' => 'usluga'
],
]
] );
users.filter(u => u.services.some(s => filterBy.every(f => s.categories.includes(f))))
users.filter(u => filterBy.every(f => u.services.some(s => s.categories.includes(f))))
users.filter(u => filterBy.some(f => u.services.some(s => s.categories.includes(f))))