List the categories an entry is part of?
This will list all the categories that are assigned to the entry regardless of level.

&lt;ul&gt;
    {% for category in entry.categoriesFieldHandle %}
        &lt;li&gt;&lt;a href="{{ category.url }}"&gt;category.title&lt;/a&gt;&lt;/li&gt;
    {% endfor %}
&lt;/ul&gt;


If you only want to list the subcategories, (regardless of whether a main category is also assigned) then you can add a test for the category level.

&lt;ul&gt;
    {% for category in entry.categoriesFieldHandle %}
        {% if category.level &gt; 1 %}
            &lt;li&gt;&lt;a href="{{ category.url }}"&gt;category.title&lt;/a&gt;&lt;/li&gt;
        {% endif %}
    {% endfor %}
&lt;/ul&gt;