From 5eef57ec0e3907a360baca321bccf5f73bac8b07 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Mon, 24 Mar 2014 21:30:14 +0000 Subject: [PATCH] Use the current post's post type when determining post adjacency. props ethitter. fixes #26937. Built from https://develop.svn.wordpress.org/trunk@27692 git-svn-id: http://core.svn.wordpress.org/trunk@27531 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/link-template.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/link-template.php b/wp-includes/link-template.php index d58c951810..16e5f6472e 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -1293,7 +1293,7 @@ class WP_Adjacent_Post { $query_args = array( 'posts_per_page' => 1, 'post_status' => 'publish', - 'post_type' => 'post', + 'post_type' => $this->current_post->post_type, 'orderby' => 'date', 'order' => 'previous' === $this->adjacent ? 'DESC' : 'ASC', 'ignore_sticky_posts' => true,