Title: Next / previous post error
Last modified: October 15, 2022

---

# Next / previous post error

 *  Resolved [srtajpg](https://wordpress.org/support/users/srtajpg/)
 * (@srtajpg)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/next-previous-post-error/)
 * Hi team,
 * I have enabled the “next/previous” post option in the customization area to be
   shown below the posts, however, the next/previous links skip the posts from different
   categories. For instance, the previous post will miss 3 or 4 articles that were
   published in between just because they are not in the same category.
 * Could you please let me know how to fix this?
 * Many thanks in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fnext-previous-post-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Steven (LyraThemes)](https://wordpress.org/support/users/stevenlyrathemes/)
 * (@stevenlyrathemes)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/next-previous-post-error/#post-16103218)
 * Hi [@srtajpg](https://wordpress.org/support/users/srtajpg/),
 * This is something that is intentional, but if you prefer to not limit the previous/
   next links to the same category, you can make a slight change in your theme file
   to override this.
 * If you’re using a child theme, you can include a copy of single.php in the child
   theme, and change one argument from true to false on two lines. From this:
 *     ```
                   <div class="previous_post"><?php previous_post_link('%link','%title',true); ?></div>
                   <div class="next_post"><?php next_post_link('%link','%title',true); ?></div>
       ```
   
 * To this:
 *     ```
                   <div class="previous_post"><?php previous_post_link('%link','%title',false); ?></div>
                   <div class="next_post"><?php next_post_link('%link','%title',false); ?></div>
       ```
   
 * If you have any questions or run into any trouble, just let us know!
 *  Thread Starter [srtajpg](https://wordpress.org/support/users/srtajpg/)
 * (@srtajpg)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/next-previous-post-error/#post-16113079)
 * Thanks a lot. It´s a pity that there is no other solution, as I am not using 
   a child theme.
    Have a nice day.
 *  [Steven (LyraThemes)](https://wordpress.org/support/users/stevenlyrathemes/)
 * (@stevenlyrathemes)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/next-previous-post-error/#post-16113783)
 * Ah, gotcha. Well it seems like it could be a useful thing to have a theme option
   for, so I’ll make a note of this to ensure it’s included in a theme update.
 * Thanks for the feedback!
 *  Thread Starter [srtajpg](https://wordpress.org/support/users/srtajpg/)
 * (@srtajpg)
 * [3 years, 7 months ago](https://wordpress.org/support/topic/next-previous-post-error/#post-16114013)
 * Thanks a lot!
 *  Theme Author [lyrathemes](https://wordpress.org/support/users/lyrathemes/)
 * (@lyrathemes)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/next-previous-post-error/#post-16236503)
 * Hi [@srtajpg](https://wordpress.org/support/users/srtajpg/),
 * Just wanted to follow up and let you know that we were able to implement your
   feedback into the recent version 2.6…thanks again for sharing! 🙂
 *  Thread Starter [srtajpg](https://wordpress.org/support/users/srtajpg/)
 * (@srtajpg)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/next-previous-post-error/#post-16240122)
 * Thanks a lot team! I already have it 💟.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Next / previous post error’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/kale/2.8.2/screenshot.jpg)
 * Kale
 * [Support Threads](https://wordpress.org/support/theme/kale/)
 * [Active Topics](https://wordpress.org/support/theme/kale/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/kale/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/kale/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [srtajpg](https://wordpress.org/support/users/srtajpg/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/next-previous-post-error/#post-16240122)
 * Status: resolved