From 06fc36b14233ce700a3edb3bbc987c554f156ff3 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 14 Apr 2008 17:56:58 +0000 Subject: [PATCH] Fix category exclusion when getting adjacent posts. Props filosofo. fixes #6551 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@7667 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 f34d9b5bb2..74da3e7478 100644 --- a/wp-includes/link-template.php +++ b/wp-includes/link-template.php @@ -554,7 +554,7 @@ function get_adjacent_post($in_same_cat = false, $excluded_categories = '', $pre } if ( !empty($excluded_categories) ) { - $posts_in_ex_cats_sql = " AND tt.term_id NOT IN (" . implode($excluded_categories, ',') . ')'; + $posts_in_ex_cats_sql = " AND tt.taxonomy = 'category' AND tt.term_id NOT IN (" . implode($excluded_categories, ',') . ')'; } } }