-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inherit author from global query #40648
Conversation
Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
@Mamaduka Great suggestion! We do all these guards in post template or query no results as well. Why?
could go away? |
@draganescu, we need all the global arguments to build an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works as expected. Thanks, @draganescu!
* inherit autheor from global query * remove useless merge with block query args since there are none * lint PHP * Simplify getting author from query vars Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com> Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
What?
Fixes #40431
Why?
When building author archive templates the author block should still render even if there are no posts.
How?
If there is no context we default to trying to get the author from the global query.
Testing Instructions
Notes