A
A
alexeimene2020-02-24 18:47:49
WordPress
alexeimene, 2020-02-24 18:47:49

How to hide a block if it has no tags?

Tell me how to hide the sidar if it is empty.
that is, the product filter is displayed only in the category where the product is displayed,
and in the card and in the parent category (products are displayed only in subcategories), an empty block.
According to the markup goes ^

<aside>
<section>
</section>
</aside>


If there is a filter, and so empty aside.
Through :empty, CSS, does not disappear, does not work

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2020-02-24
@Kozack

https://wp-kama.ru/function/is_active_sidebar
Or use WP's great many conditional functions instead to display the sitebar only where needed

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question