Opened 8 years ago
Closed 8 years ago
#39417 closed defect (bug) (invalid)
get_queried_object() stopped working on author archive template in WP 4.7
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.7 |
Component: | Query | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
Hi,
In WP 4.7 get_queried_object() function doesn't work anymore if called inside author archive. It doesn't return anything. Also, get_queried_object_id() always returns 0.
This is working fine when permalinks are set to "plain" (i.e. ?author=5), but not if permalinks are set to "post name" (i.e. author/some-author-slug)
That's what we have found so far. Any feedback is highly appreciated.
Thanks,
Meks
Change History (4)
#3
in reply to:
↑ 1
@
8 years ago
Replying to johnbillion:
Thanks for the report, @mekshq.
I'm unable to reproduce this problem.
get_queried_object()
correctly returns theWP_User
object for the archive author. Can you test this with one of the default themes active and all your plugins deactivated please?
@johnbillion Thanks for reaching out! I have checked again and it seems it is working fine in version 4.7.4, so it must have been fixed somewhere between 4.7. and 4.7.4.
Thanks for the report, @mekshq.
I'm unable to reproduce this problem.
get_queried_object()
correctly returns theWP_User
object for the archive author. Can you test this with one of the default themes active and all your plugins deactivated please?