У меня есть веб-сайт Wordpress, который вы можете посмотреть здесь: PRAXIS3.com.
На этой конкретной странице «Автомобилестроение» у меня есть фильтр категорий. Когда я впервые загружаю страницу, по умолчанию выбирается категория «Все», но если вы нажмете «Все» второй или третий раз, она покажет КАЖДЫЙ элемент портфолио, который на сайте. Ниже приведены первые несколько строк кода выбора категории.
Код выбора категории:
<div class="btCatFilter">
<span class="btCatFilterTitle">Category filter:</span>
<span class="btCatFilterItem all" data-slug="">All</span>
<span class="btCatFilterItem" data-slug="acura">Acura</span>
<span class="btCatFilterItem" data-slug="alfa-romeo">Alfa Romeo</span>
</div>
У меня есть некоторые пользовательские настройки CSS (чтобы скрыть определенные категории от отображения) на странице, которую вы можете просмотреть ниже.
.automotive .btCatFilterItem[data-slug*="architecture"] {display: none;}
.automotive .btCatFilterItem[data-slug*="automotive"] {display: none;}
.automotive .btCatFilterItem[data-slug*="branding"] {display: none;}
.automotive .btCatFilterItem[data-slug*="civic"] {display: none;}
.automotive .btCatFilterItem[data-slug*="conceptual"] {display: none;}
.automotive .btCatFilterItem[data-slug*="hospitality"] {display: none;}
.automotive .btCatFilterItem[data-slug*="education"] {display: none;}
.automotive .btCatFilterItem[data-slug*="environmental-graphics"] {display: none;}
.automotive .btCatFilterItem[data-slug*="interior-design"] {display: none;}
.automotive .btCatFilterItem[data-slug*="mixed-use-residential"] {display: none;}
.automotive .btCatFilterItem[data-slug*="office"] {display: none;}
.automotive .btCatFilterItem[data-slug*="signage-wayfinding"] {display: none;}
.automotive .btCatFilterItem[data-slug*="financial"] {display: none;}
.automotive .btCatFilterItem[data-slug*="retail"] {display: none;}
.automotive .btCatFilterItem[data-slug*="rollout"] {display: none;}
.automotive .btCatFilterItem[data-slug*="sustainable"] {display: none;}
.automotive .btCatFilterItem[data-slug*="workplace"] {display: none;}
Я пытаюсь сделать так, чтобы при нажатии кнопки "Все" отображались все проекты в категории "Автомобилестроение".
Я пробовал каждую итерацию следующего, о которой я могу думать, и ничего не помогает.
.automotive .btCatFilterItem.all {display: "automotive";}
.automotive .btCatFilterItem.all {display: automotive;}
.automotive .btCatFilterItem.all {display: data-slug*="automotive";}
Любая помощь будет принята с благодарностью. Благодарю вас!