Trying to get 10 entries related to the current entry categories excluding a category called featured. I don't have the category name(s) in the url.
This currently what I tried but this does not work, confused about how to do this.
{# Fetch all of the categories related to this entry excluding the featured category#}
{% set categories = craft.categories.relatedTo(entry) %}
{# Output them #}
{% set thecategory = [] %}
{% for category in categories %}
{% set thecategory = craft.categories.group('resource').slug(category.slug) %}
{% endfor %}
{# Set featured category name to exclude #}
{% set category = craft.categories.group('resource').title('featured') %}
{# Set featured ID's we dont want to show... #}
{% set featuredArticleIds = craft.entries.section('articles').relatedTo(category).ids() %}
{% set featuredArticleIdsString = featuredArticleIds | join(', not ') %}
{% set entries = craft.entries.section(articles).relatedTo('and', thecategory|join(',')).id('and, not '~featuredArticleIdsString).limit(10) %}