You will need a filter on get_{$adjacent}_post_where
to add your CPT.
function alter_adj_where_wpse_106694($where) {
$where = str_replace("p.post_type="post"","p.post_type IN ('post','yourcpt')",$where);
return $where;
}
add_filter('get_next_post_where', 'alter_adj_where_wpse_106694' );
add_filter('get_previous_post_where', 'alter_adj_where_wpse_106694' );
There is no flexibility to that callback. It is a simple string replace. If this is your site you should be OK, but if this is a plugin or a theme that you are distributing you need a much more complicated callback to try to compensate for the activity of other plugins and/or themes.
Related Posts:
- Problem excluding category from get_next_post
- Modify previous and next post links to current Authors Other posts
- 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 can I get next post id after current post id for custom post type
- specify meta_key / meta_value condition for prev_post_link and next_post_link
- 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
- 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
- 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
- Restrict custom post type to only site administrator role
- How to force one column layout on custom post type edit page?
- WordPress REST Create Post of Custom Type
- Limit the post for differents custom post type in the same wp_query
- taxonomy list display custom post count
- Assigning a role to a specific custom post type (and ignoring other post types)
- Display posts in random post types
- Multiple Content Block
- Display Custom Post Type in Recent Posts
- IF statement in a do_shortcode
- Slug for standard post post_type
- How do I create an archive page for standard posts?
- Remove parent from custom post type
- Remove All, Published and Trashed Post Views in Custom Post Type
- “next_posts_link” and “previous_posts_link” display me NOTHING
- How to add post_type=value when editing that post type in the WordPress admin?
- Open Custom Post Type as PDF
- Allow non-logged in users to see a future post after clicking on a list of future posts
- Hiding posts by other users and non-logged in
- Update Post Meta for a logged in user
- Get the category from custom post type
- Is it possible to store Custom Post Type data in separate set of tables and still have wp_post class functionality?
- Prioritize posts in query by meta keys?
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Load Next Posts With AJAX not working with custom post type
- Permalink misbehaving in Custom Post Types
- Is it a good idea to add a column to the posts table?
- Display Only Certain Category In a Custom Page Template
- Creating separate feeds for custom post types
- wordpress lists similar type of posts in a custom post type
- Auto post creation
- display posts of custom post type with custom taxonomy
- WordPress post next/prev not working
- Easy reading or transfer of data from posts?
- list posts of two post types in a single template
- is it possible in a custom post, create custom fields as well whitin?
- The loop does not show users
- Display author box on just certain category posts?
- How to fetch posts that are stored in the different table than (default) wp_posts?
- Am I mixing up the concept of posts pages and categories?
- If/Else child list for Custom Post Type single template within loop?
- redirect after submiting post for review
- How to achieve a multi-taxomony layout with posts?
- i need to have a tab with gategory post
- Custom Post type to Woocommerce Product type
- How we can create menu from Appearance > Menu and use as a add-submenu-page for admin menu?
- Enforcing a rigid reusable template structure for similar posts?
- Auto delete pages/posts without views
- WordPress retrieving $post based on random key in $_POST
- minimize wp_query call to database
- Post display in separate page [duplicate]
- Limit posts per page depending on the size of a div?
- Delete Post by User
- Custom post Query and WordPress Post Query Clash
- Setting up a page to house certain types of posts
- Multiple Custom Post Type with different Taxonomies
- Only show current category post
- WordPress Contents Migration
- Filter By Term Not Working – Custom Post Type
- Problem to get the link of the default ‘post’ post type like the orther custom types
- Featured image in custom post is being disabled
- How to set class to “current-page” on the currently viewed single post within a CPT
- Getting wrong ID
- How to make post page unique and show it on home page?
- How to create content automatically when a post is published?
- query_post causes the posts to be loaded twice on load more posts
- Query Only Show Text on Posts With Certain Taxonomy Tag
- Query Posts From Multiple Post Types
- WP Build-In Post selector for CPT
- Trying to display next and previous set of posts on separate page (not parent page)
- How to make a template for a specific post of a custom post type?
- How to hide home title on pages and posts?
- How do I hide single category post on my post page
- Front end post or photo or both
- Can WordPress show posts based on a button that the user clicked 2 pages back?
- Two pagination in one page without AJAX