Here’s a good place to start:
- http://codex.wordpress.org/Template_Tags/previous_post_link
- http://codex.wordpress.org/Template_Tags/next_post_link
As you will see, keeping the links to posts of the same category is as simple as setting an argument in the function.
I would give an example but there are really good examples on the pages linked above.
Related Posts:
- Get previous/next post from (specific) category
- How to get next and previous post links, alphabetically by title, across post types, in a shortcode
- Filter get_adjacent_post() for private posts, how to modify JOIN/WHERE?
- Thumbnail (featured image) of next and previous post is not being properly displayed!
- Next/Previous Posts Links: Alphabetically and from Same Category
- Why is previous_post_link and next_post_link working outside of the Loop?
- Next and previous link in custom post type in the same taxonomy term
- Disable “previous link” in first post and “next link” in last post
- excluded_categories parameter in next_post_link() behaving unexpectedly
- Next and prev. post link ONLY within category
- Previous/Next Post Within the Category?
- How to show link to next posts in single.php
- previous_post_link() next_post_link() arrow position
- WordPress “Next Post” URL and Thumbnail
- Add #anchor to next/previous_post_link
- Check if next post is available and output a link
- get rid of the arrow in previous_post_link?
- Change OR logic of get_adjacent_post into AND
- Using ‘previous_post_link()’ & ‘next_post_link()’ on single attachment pages
- get_next_post_link() and get_previous_post_link() return wrong posts
- WordPress next/prev links Issue
- Single: Prev and next Post in same order as main query, in all categories
- altering %title
- Include scheduled ( future ) posts in WordPress post navigation ( previous_post_link, next_post_link )
- get_adjacent_post – in same term not working
- Trying to get_adjacent_post – in same category not working
- next/previous post links for specific category when post belongs to multiple categories
- Show category in Previous/Next links
- make random internal linking in the middle of posting
- Why is one of my posts prefixed with “Next Post” on Google search
- How to Navigate within Category? Lot of codes here on stackexchange didn’t work
- Next and Prev post link breaks code on last post
- Multiple next / previous
- Single post navigation Previous post link shows up but Next post link doesn’t
- Next/previous post link to posts only within one or more specific categories
- How to add thumbnail support to WordPress next / previous post loop?
- Get Next / Prev 3 Posts in Relation to Current Post
- How to Get Next or Previous Post in a Specific Tag?
- Get previously visited page ID
- Making a Shortcode [NEXT] and [PREVIOUS] to place into specific posts for post navigation
- get_adjacent_post alternative on a very large db
- next and previous post link ordered alphabetically
- Problem excluding category from get_next_post
- Get next/previous cousin page
- next_posts_link not working in custom loop
- Showing Thumbnail from Previous and Next Posts
- get next next post in single.php
- How do I insert CSS into a function?
- Previous_post and Next_post – Custom Post Type
- next_post_link for CPT only working for a few posts? weird!
- Exclude Posts From Specific Category from Next and Previous post links
- Is it possible to skip certain specified pages when using < prev and next > links?
- Why do next pages load the same content rather then older articles?
- Next Previous siblings child pages
- Next and Previous Posts of Same Parent
- Get Prevous/Next Post Specific Category Without Excludes
- Show category from “Next post” and “Previous post” [edited]
- previous/next_post_link in the same sub-category?
- Previous/next post links displaying wrong category than is desired
- Next Posts Prev Posts for Standard post format only
- next_posts_link and previous_posts_link problem
- Get ID for previous/next image link
- Pagination for custom loop on custom page template is not displaying anything
- Previous and older set of posts links
- Custom Posts and Posts – next_post_link and previous_post_link not working together
- using images in next/previous_post_link [closed]
- Show multiple next and previous posts
- Next Prev Post link rendering current post thumbnail
- grab neighboring content in a query
- Plugin: Events manager – Next and previous event
- WP_Query and pagination AGAIN?
- Next/Previous Product with custom order by price & products inside the product category [closed]
- CPT : Next or Previous term link when has not adjacent post
- How to get next and previous post into ajax formed modal windows?
- Order by post_date does not work in Previous and Next post pagination
- Infinite next / prev post in single.php page
- How to exclude posts by meta key value in the_post_navigation next prev links?
- Infinite looping next post link within a certain category on a post
- get_next_post() not working with future post status
- how to overwrite next_post_link
- Previous/Next custom post links within custom taxonomy
- How to know if the most recent article
- How do I modify the Previous and Next Page posts on blog pages to include “previous” and “next” before the links?
- How to change the wording of front-end `next article` for custom type registered in a plug-in?
- Next/Previous Post Links in single-[custom-post-type].php file
- WordPress The Next Posts
- Next/Previous links in custom taxonomy, where item may belong to multiple terms
- Next page link via the custom menu
- using next-page and previous page inside a wp_query
- Getting meta content from get_next_post & get_previous_post
- Tags interfering with next_post_link();
- get next/previous post name
- customize urls displayed by previous_post_link and next_post_link
- Footer with next/previous posts
- Is that the query_posts() the real criminal here?
- Change next_post and previous_link to navigate throught parent categories only
- pagination/prev and next page links not showing
- Exactly where I have to insert get_next_post_link() in a post?
- Multiple loops using next_posts_link & previous_posts_link
- Add a “Next Post” & “Previous Post” styled button manually to a post