Maybe this function is better to use get_adjacent_post.
I have not tested it yet but it seems to more flexible than the_post_navigation() function.
FYI, the_post_navigation() uses this function internally to retrieve the next and previous posts.
Maybe this function is better to use get_adjacent_post.
I have not tested it yet but it seems to more flexible than the_post_navigation() function.
FYI, the_post_navigation() uses this function internally to retrieve the next and previous posts.