New answers tagged

3 votes

Batch retrieve the entry count per category item in facet filter

Good question. Try this. ... {% set productIds = craft.products.relatedTo(category).ids() %} {% set brandsFilterOptions ='brandCategories').relatedTo({ sourceElement: ...
  • 4,289
2 votes

Convert Categories into Structure entries

Craft 4.4 (which is due to release in Q1 2023) will include a native CLI command that will "aid in migrating existing categories, tags, and global sets over to entries". Full details here: ...
2 votes

How to display a category on the site?

This is solution: {% set categories = craft.categories().descendantOf(222).descendantDist(3).all() %}
  • 253

Top 50 recent answers are included