humanmade / humanmade/authorship
Calling wp_reset_postdata does not reset global $authordata to authorship user.
- Dominant language
- PHP
- Stars
- 68
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
I'm running into an issue where the WP core archive title block does not display the correct name on the author archive.
Problem is that we are using the query block in a template _before_ displaying the title. Global `$authordata` is reset to the true author of the first post in the main query and not the authorship user.
I worked around this for my project but wanted to raise it here. Unsure if this is a bug exactly. And not totally sure of the fix. [This is originally set here](https://github.com/humanmade/authorship/blob/b73358cbc75a6a75ef647ad41a0e649a76c8edc0/inc/namespace.php#L288), hooked in on `wp`. Perhaps should also hook in on `the_post` to set the `authordata`?
Contributor guide
Assessment
This issue has not been assessed yet.