Single Post Navigation within Category


I’m using Airi Pro Theme and need to make some customization, regarding the post navigation on single posts (prev-next-links). I’d like the navigation only to skip between posts within its category. This should be a wordpress standard feature by changing " $in_same_term = false, " to true. But I need to know where to find this code in airi theme and how to change it. Maybe with some extra code in the child themes function?

Maybe there is a different solution to!? For me it’s alright to exclude one certain category from the navigation if this is easier to solve!



You can try to copy single.php file to child theme folder, edit copied file with a text editor and replace the_post_navigation(); (row 23) with this:

the_post_navigation( array(
    'in_same_term' => true,
) );

Kind Regards, Roman.
aThemes Support

Great! That’s it! It worked perfectly.

Thank you

You are welcome! :slight_smile:

Please feel free to ask any other questions that you might have in future.

Kind Regards, Roman.
aThemes Support