Hi i have a wordpress web site with the category structure as below
Lessons ( Parent )
--Guitar Training ( Child Of Lessons )
--Keyboard Training ( Child Of Lessons )
--Vocal Training ( Child Of Lessons )
What i exactly need is to stay in the same child category when navigating using next/prev buttons. i do not want the next/prev buttons to take the user to an other child category. To be more specific if the user is browsing the Vocal Training course, i need the prev/links to stay in the same category. But the problem is the previous/next_post_link in single.php does not stay in a category.
So as the WP Codex Says i tried
<?php get_next_post( $in_same_cat, $excluded_cats ) ?>
But it does not work since the posts are always linked to multiple categories in my case (eg: Lessons, Guitar Training ). Is their any way to stay in the child category ? in this case only within Guitar Training ?