Fix category_name=foo WP_Queries. fixes #4069

git-svn-id: https://develop.svn.wordpress.org/trunk@5171 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-04-02 19:40:15 +00:00
parent 3be1be3815
commit aa82383dc6
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'";