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?


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: