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:
parent
3be1be3815
commit
aa82383dc6
|
@ -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'";
|
||||
|
|
Loading…
Reference in New Issue