You mention a custom post type, are you also using a custom taxonomy? If so you need to specify this taxonomy in your function call:
the_post_navigation(array(
'prev_text'=>__('previous project: %title'),
'next_text'=>__('next project: %title'),
'in_same_term' => true,
'taxonomy' => 'wpse240053_custom_taxonomy_name',
));
By default the built-in category
taxonomy for Posts is used. This requires WP4.4 or later.
Related Posts:
- Getting the Next and Previous Posts Titles in the Sidebar?
- Adding Post Counts to Menu (Nav) Programmatically?
- Navigation link to specific user page
- Post Navigation
- Restrict post navigation to current sub menu
- get_next_post() and get_previous_post() return wrong posts
- Disable most recent & view all (TABS) on nav-menu.php
- Is it possible to create a form post wordpress custom navigation link?
- remove older posts link [closed]
- How to create a submenu that will navigate through different posts in the same page
- How to Next and Prevous Navigation Buttons on the end of the page with custom image Using Wp Post Navigation Plugin
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- One menu for frontpage (one pager), and a different menu for posts
- Show only one page link in content pagination
- Highlight static blog page link in header
- Show posts count for Categories and Tags in wp_nav_menu
- Restrict the_post-navigation to same category?
- Navigate through the posts using keyboard arrows
- WordPress pagination and Post Navigation not working on home page
- Get current post’s nav menu name (term name)
- Add Text Domain To Post Navigation
- How to show next/prev link, when it’s not active?
- Possible?! A contextually titled back link
- Post navigation using date
- Blog posts pagination not working
- Change URL of previous posts and next posts link in WordPress
- get_next_post() not working with future post status
- Excluding category from post navigation in WordPress?
- Creating a link to the first post in a category
- Next / Previous post in a single category
- How to add navigation arrows to manually slide through posts?
- Can the_post_navigation() be outside of the loop?
- Output wp_link_pages as raw url
- Page and Posts loading as index page? Not loading the content
- Count > 1 Navigation Slider
- How do I paginate posts page with $wpdb?
- ‘get_previous_post’ in same category returning (!empty) when no previous post in category exists
- How can I get the first post THIS SAME CATEGORY?
- Show a page counter for pagination
- How can I merge a several related posts into one post?
- Should we trust the post globals?
- how to limit edit_form_after_title hook to page and post edit only?
- Add a checkbox to post screen that adds a class to the title
- How to cache a shortcode functions output?
- How to call function within a page/post, to dynamically generate content?
- Load posts dynamically
- How do I create a featured post within a custom post type?
- How to show posts rank based on custom field value
- How do I create Comma Separated list of attached image ids?
- Rewriting WordPress core functionallity: Changing the private posts
- Post author is changed to admin after his post is modified by admin
- How to share same post to multiple site in wordpress?
- How can I control multiple editing of wordpress posts?
- How to update serialized post meta?
- pagination hook doesn’t work with search results
- Frontend Post Form Validation
- While in “the loop”, detect if a post is the most recent
- Edit Post VS Custom Form
- Post update RSS notification plugin
- Templating of a specific post ID
- WP_Query get posts from custom posts by category
- List posts in a given category
- Adding parent pages to posts
- Limit posts per author role (excluding admin) in home page
- I want to display custom text widgets for each post in the sidebar?
- Append class to posts page
- What’s the best way to render Visual Composer in posts, not pages?
- Trying to use AngularJS with WordPress without any API
- Showing author page if user has no post
- post category in wp_insert_post
- Fixing paragraph spacing in posts
- Customize rel=canonical tag for single blog post
- Widget that shows categories with posts numbers
- Hide comments and posts posted by other user
- How to remove specific tag from multiple posts?
- Why this function doesn’t works without the_post?
- Why can’t publish posts with too much text?
- wordpress add field to post_class
- How to store array in usermeta in wordpress
- Setting limit to posts or page creation
- write a post on user registration
- Cannot select certain authors for posts after import
- Lightbox on wordpress post page
- post/page content
- WordPress Architecture as a CMS – Posts & Pages
- Getting post and attached image from subdomain
- Is there a way to categorize a list posts all at once?
- Display “no post” message
- Not adding a new post?
- On the online version of my blog posts disappear
- Thumbnails and images in the blog post are not loading
- What’s the best approach to create duplicated pages with paginated posts?
- including 404 page in post page
- Posts only showing on /localhost/wordpress/ and not on other pages
- Posts are printed twice
- Custom filter on all post page (admin backend)
- Make Show Notes for Individual Podcast Episodes Easy to Find (multiple URL’s?)
- How can I count articles retrieved by tags
- Creating / Editing a post from within site template
- How can I get on the same row two post of different categories?