Get category id of next / prev post inside the_post_navigation
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.
$299 Affordable Web Design WordPress
This article was republished from its original source.
Pixeldust is a 20-year-old web development agency specializing in Drupal and WordPress and working with clients all over the country. With our best in class capabilities, we work with small businesses and fortune 500 companies alike. Give us a call at 1(800)730-2416 and let’s talk about your project.