Home > Blockchain >  Wordpress delete categorie filter
Wordpress delete categorie filter

Time:11-28

I am using a Wordpress Widget to filter my photos but I want to delte the "All" Filter-Categorie and it´s not possible in the Widget settings. So I tried with custom css: main a.data-vp-filter {display: none} but it doesn´t work. The code of the All-Categorie

The All-Categorie I want to delete

CodePudding user response:

Since all the filter items have the same class you could add the following to your custom css:

.vp-filter .vp-filter__item:first-of-type {
   display: none !important; 
}

This will select the first-type of class. MDN Source

Preview:

.vp-filter .vp-filter__item:first-of-type {
  display: none; 
}
<div class="vp-filter">
  <div class="vp-filter__item">
    <a>All</a>
  </div>
  <div class="vp-filter__item">
    <a>Filter 1</a>
  </div>
  <div class="vp-filter__item">
    <a>Filter 2</a>
  </div>
  <div class="vp-filter__item">
    <a>Filter 3</a>
  </div>
  <div class="vp-filter__item">
    <a>Filter 4</a>
  </div>
  <div class="vp-filter__item">
    <a>Filter 5</a>
  </div>
  <div class="vp-filter__item">
    <a>Filter 6</a>
  </div>
</div>
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

  • Related