mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Fix attachment links for permalink structures containing category tag. Props andy. fixes #4699
git-svn-id: https://develop.svn.wordpress.org/trunk@7531 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1036,7 +1036,7 @@ class WP_Query {
|
||||
}
|
||||
|
||||
// Category stuff for nice URLs
|
||||
if ( '' != $q['category_name'] ) {
|
||||
if ( '' != $q['category_name'] && !$this->is_singular ) {
|
||||
$reqcat = get_category_by_path($q['category_name']);
|
||||
$q['category_name'] = str_replace('%2F', '/', urlencode(urldecode($q['category_name'])));
|
||||
$cat_paths = '/' . trim($q['category_name'], '/');
|
||||
|
||||
Reference in New Issue
Block a user