Did you try with: get_adjacent_post
?
get_adjacent_post(false, 'YourID', false);
Related Posts:
- specify meta_key / meta_value condition for prev_post_link and next_post_link
- Modify previous and next post links to current Authors Other posts
- Custom Posts and Posts – next_post_link and previous_post_link not working together
- Include “Scheduled” (“Future”) Posts in WordPress Post Navigation ( previous_post_link, next_post_link ) for a Specific Custom Post Type
- How to get next post link of child custom post type from parent post and get next post link of parent post from the last child post?
- Prev/Next Navigation on Single Post Disappeared for Custom Post Type
- Can the Next/Prev Post links be ordered by menu order or by a meta key?
- Filter next_post_link() and previous_post_link() by meta_key?
- How can I get next/ previous post links to order by a filter (by the last word of the title)?
- How make get_next_post() return first post when viewing last one
- How can I get next post id after current post id for custom post type
- Using previous_post_link and next_post_link to wrap around post sequence
- Working with Next and Prev links in Single Taxonomy Templates
- Make `previous_post_link()` Function Show The Post After Next i.e. Jump A Post
- next_post_link and previous_post_link in custom post type single page, in same non-custom category
- Next and Previous Posts of Same Parent
- Why are previous_post_link/next_post_link skipping some posts?
- Add Previous/Next Buttons to CPT Single Pages Only
- Display next 3 posts based on custom taxonomy
- Change URL of previous posts and next posts link in WordPress
- Back, Next, and Previous links for the REFERRING term archive
- get_previous_post_link and get_next_post_link of custom post type that share custom field value
- Previous/Next custom post links within custom taxonomy
- Next/Previous Post Links in single-[custom-post-type].php file
- show previous/next post orderer by title in custom post types
- previous_posts_link returns null when querying custom post type
- What does this PHP function code mean? [closed]
- Remove slug from custom post type post URLs
- Hook for post and page load
- WP_Query Pagination on single-custom.php
- Restrict custom post type to only site administrator role
- Add extra parameters after permalink?
- Submit post and upload image from front-end
- How to get post content by calling ajax?
- How to show all posts of the category in wordpress?
- Get the ID of the latest post
- is it possible to get next_post_link
- Possible to change the URL for the regular post type without affecting the URL of other custom post types?
- Change permalinks for posts but not for custom post types
- Front end post editing using a form
- Linking Two Post Types
- How can I convert Posts into Custom type posts?
- Set posts of a custom post type to be private by default?
- Enable sticky posts to custom post_type
- How to force one column layout on custom post type edit page?
- Limit the word count in the post title
- Correct Post Count ( All | Published | Drafts | Pending | Trash ) for Custom Post Type when restricting to view own posts
- Fetch All Posts (Including Those Using a Custom Post Type) With WordPress API
- Make featured image required
- previous_post_link() and next_post_link() with a custom post type?
- Remove current_page_parent nav class from blog index when in CPT
- Get category id from post id of a custom post type
- How do I add a new custom post format?
- Setting a custom sub-path for blog without using pages?
- WordPress Custom Post Types with a page as a parent?
- How to order adjacent posts (prev / next) by custom field value?
- How to model a hierarchy for courses, levels and lessons?
- How to add a button to custom post type’s posts-page
- How can I add a column/s to wp_posts table?
- WordPress REST Create Post of Custom Type
- flush_rewrite_rules on save_post Does Not Work on First Post Save
- Limit widget to a specific registered sidebar
- WP_List_Table Inside Metabox Not Working on Submit
- post_row_actions for custom post type
- Pull Two Posts Into Custom Post Type `single-cpt.php`
- How can I limit the length of the previous/next posts in my WordPress Theme?
- Why get_next_post_link() or get_previous_post_link() doesn’t return the required links?
- Add metabox with media uploader in a custom post type [duplicate]
- Edit the “Post updated. View post” link
- modify all posts of a category to “no comments allowed”
- Getting a div content of a post in wordpress?
- Limit the post for differents custom post type in the same wp_query
- How can I add dropdown widget/box to admin post page?
- How to hook get_terms() to only show count of posts that have custom meta
- Why is the »_builtin« parameter not advised in »register_post_type()« for custom post types?
- How Can the Users Make a “Playlist” of Posts?
- Create Post tabs in single-{content-type}.php with Custom Field values
- Showing current taxonomy terms
- Custom Posts on Different Pages
- Custom permalinks – post type – hierarchical taxonomy’s
- Newer/Older posts links display same posts on every page
- taxonomy list display custom post count
- Loading post content in FancyBox
- automatically create taxonomy with same name as post title
- How to let custom post type posts show in standard post archive (like in homepage)?
- Rewrite custom post & taxonomy to share same URL path
- How do I write this SQL statement for Posts written in last 24 hours?
- custom sortable column
- Nav menu of all posts in a custom post type
- How to show related posts by category or custom post type?
- Downsides to not using built-in “Posts” post type?
- 960gs different classes on teasers posts
- Assigning a role to a specific custom post type (and ignoring other post types)
- Wp-query causing problems with the_content();
- Display posts in random post types
- Full-Ajax Theme: parseJSON error while building a JSON object from a WordPress custom template
- Custom Post Type by user
- Structuring a product catalogue in WordPress [closed]
- saving custom post type data to different table in wordpress
- How to create posts (not post template) to be displayed on projects page?