I would like to get_the_category inside the_post_navigation. I created a custom field on Categories to assign a hex color to each category. I would like to use this color as the next / prev link background color when hovering on the post navigation.
How can I get the id of the category of the "next" or "prev" post?
I should clarify that every post has only two categories and I am only trying to get the id of the second category.