Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jonathandejong

    (@jonathandejong)

    Hi Siwise,

    If you check the HTML structure there should be unique classes for each level of terms.. I think it’s something like “depth-0” etc.

    Just use that! ??
    Best of luck

    Thread Starter siwise

    (@siwise)

    Hi Jonathan,
    Thanks for the reply. This is the HTML for a parent term:

    <li class="select2-results__option" id="select2-select-listingcategory-result-hk4t-culture" role="treeitem" aria-selected="false">Culture</li>

    Haven’t had any luck finding anything about depth in HTML.

    Plugin Author Jonathandejong

    (@jonathandejong)

    Hmm that’s strange.
    Must’ve been a change in select2 v4..

    EDIT:
    Yep. I’ve tested both versions now and it is indeed something that’s been removed in v4.
    Previously select2 would copy over all classes from the original select which contains depth-n.

    I’ve looked over documentation and issues in github but there seems to be nothing about it.
    The only solution would be to roll back to 3.x which I’d rather not do since it’s pretty much discontinued.

    If you want to solve this for yourself you can disable select2 under advanced settings and add it yourself. Just load in select2 in your theme or a plugin and initialize it on .beautiful-taxonomy-filters-select.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add styling to just parent categories’ is closed to new replies.