You should be able to exclude the category you don’t want to show by adding $excluded_terms to your navigation links. So for example, if the category you don’t want showing up is id 4 your link would look like:
<?php next_post_link( '%link', 'Next Post', false, '4' );?>
Same with previous_post_link()
.
Related Posts:
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- Code to display random ordered posts in Categories across pages [duplicate]
- how to show posts on different pages if number of post per page is one
- How to get pagination working with “Pending” Posts
- Allow variable amount of comments before pagination
- How to get the number of posts in a selected category?
- Show related posts by category but ignore one category
- How to sort posts by last name (2nd word) on ONE category only?
- Automatically create pages in a post based on number of words
- Programmatically inserting page breaks
- prevent showing posts of an specific category in admin posts section
- Add custom field to category of custom post type
- Can I hide a specific post from latest posts page?
- Load posts into sidebar and paginate via ajax?
- How to show post(excerpt) from specific category on wp page?
- New blog template to display only one category
- WordPress – Admin Manage Posts – Multiple Filters by Parent Category
- Custom Theme Want To Remove One Category From All Displays
- Divide Loop Into Days & Categories
- How can I list random authors from current post category?
- Different template for posts of all subcategories of category
- How do I render all posts of the same category in same layout?
- WordPress list posts from sub categories
- Mark menu item as current-menu-item for category
- How to display different number of posts
- How to set up multiple taxonomies for groups of posts
- Getting content from a single *page* of a post
- How to display category from recent posts?
- Can I divide the pages into categories?
- Child_of not displaying all children posts.. via get_posts
- Duplicate posts and change category
- Category Foreach keeps looping?
- display a random post thumbnail from a random category
- pagination for single post by category
- Post page to display specific category
- Get Posts Under Custom Taxonomy
- Prevent additional top level categories but allow more children
- how to show single post in a custom template
- Start post pagination at 0 instead of 1
- Excluding posts not working
- Hide posts belongs to few categories in homepage
- Limit the number of posts a category can have – newest post goes in, oldest one drops out, possible? plugin?
- Remove current category from post but display all others
- Why are my paginated posts always returning the same results?
- How do I show posts from another wordpress installation?
- Why won’t pagination work?
- How do I include the category next to the title of a post?
- Relative number of post in category
- How to show a custom taxonomy in the theme?
- How to import nested categories from XML file?
- Migrate posts from category and sub-category via SQL
- Posts Missing in Dashboard after update
- Display post number by category
- Custom Post Limit for homepage only without plugin?
- How to get post with slug and exclude categories
- Retrieving posts by their date and category
- Are post, page and category IDs unique to each other?
- Static pages not working
- WordPress displays post on subcategory only
- Remove Featured Image from posts in specific category?
- Categories Listing and Highlighting current category item
- Display hierarchical categories/sub-categories for a single post only
- Author post count in category
- Problem paginating a subquery on a post
- Why do I have categories with duplicate slugs?
- How to display the pagination in my post list? [duplicate]
- How can I get the last post while on the first post for pagination? As if it were infinite
- Pagination (on the static front page) shows always the same posts
- Automatic Table of contents with categories and posts
- More Than 50K Categories and WordPress Admin Panel Stop Showing Categories and Posts
- Re-order Category Meta-data
- Is it possible to remove actual post pages in wordpress but keep them in categories
- Need help with hiding an image within a post in a category
- WordPress not showing recent posts
- How to get post count including nested categories
- How to filter out post from a category not its subcategory in wordpress dashboard
- List posts of assigned categories in list of all categories on single.php
- How can I display a specific number of post in a category via a url
- how to chang preview of list of articles of one category?
- Assign specific ads to specific categories/posts
- Order posts by separate menu order for different sub-categories
- Make a paginated article (for easier reading on mobile)
- find posts with exactly 3/4 categories
- Use radio buttons & checkboxes for post categories
- Delete old post with new post
- Displaying only posts from a certain category on my custom page template
- WP_Query: Fetch posts that are in (category1 and not in category2), OR posts that are not in cagegory1
- Add default content to post (for specific category)
- List posts that are in the same category as the current post title
- WordPress posts loop pagination – first page return 125 posts instead of 10 and the rest return 10
- Multiple blog “feeds” in a single blog each with distinctly styled post pages
- Post’s arent displaying
- Show with echo if a post has two or more categories
- How can I get on the same row two post of different categories?
- Show a page counter for pagination
- Sort Posts Alphabetically Based on Specific Category (Divi)
- How to remove category and other tags from posts page
- I have a website issue I am trying to resolve
- How to sort posts alphabetically based on a specific parent category
- Get the category of post from which category page it have been clicked