Hi, i am trying to get the name of the current post category, and compare it to do some conditional tasks
but the condition don't work, i think because the category is not just a slug, it's a link !
here is my code
{% set cat = mb.get_the_term_list( post.ID, 'category') %}
{{ cat }}
{% if cat == archives %}
<p>test</p>
{% endif %}
i try to echo test when the category slug is 'archives'
i also tried with
{% set termList = mb.get_the_terms( post.ID, 'category' ) %}
{{ termList[0].slug }}
but it didn't work either, maybe because i get a couple empty lines when it showed up in the chrome inspector !
i just need to get the category slug to compare it with simple text for some conditions
please help
thanks in advance