I have a filter system on my website which uses categories. The categories have all got their own ID tagged to their HTML Element. Now I just need to get the clicked checkboxes to add their ID to the Twig variable which displays the entries in the for loop.
{% set categories = craft.categories.section('retrospect') %}
{% set relatedCategories = [] %}
{% for category in categories %}
{% set relatedCategories = relatedCategories|merge([taggedIds]) %}
{% endfor %}
{% set related = craft.categories.section('retrospect').id(relatedCategories) %}
{% set relatedArticles = craft.entries.section('retrospect').relatedTo(related) %}
{% for entry in relatedArticles.order('caseNumber asc').after('2016-01').before('2016-12') %}
{{ entry.title }}
{% endfor %}