Fix category_name=foo WP_Queries. fixes #4069

git-svn-id: http://svn.automattic.com/wordpress/trunk@5171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2007-04-02 19:40:15 +00:00
parent 06d577a539
commit 923ba23e88
1 changed files with 1 additions and 1 deletions

View File

@ -916,7 +916,7 @@ class WP_Query {
$tables = ", $wpdb->post2cat, $wpdb->categories";
$join = " LEFT JOIN $wpdb->post2cat ON ($wpdb->posts.ID = $wpdb->post2cat.post_id) LEFT JOIN $wpdb->categories ON ($wpdb->post2cat.category_id = $wpdb->categories.cat_ID) ";
$whichcat = " AND category_id IN ({$q['cat']} ";
$whichcat = " AND category_id IN ({$q['cat']}, ";
$whichcat .= get_category_children($q['cat'], '', ', ');
$whichcat = substr($whichcat, 0, -2);
$whichcat .= ") AND rel_type = 'category'";