How I can get the first post category using get_the_category() with Timber?

I have the postID, and I need use get_the_category(). Doing :

{{ function('get_the_category', event_id) }}

this return just the string “Array”, but I need the first category. I need something like:

{{ function('get_the_category[0]', event_id) }}

Read more here: How I can get the first post category using get_the_category() with Timber?

Leave a Reply

Your email address will not be published. Required fields are marked *