Skip to content

Calling wp_reset_postdata does not reset global $authordata to authorship user. #157

@mattheu

Description

@mattheu

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, hooked in on wp. Perhaps should also hook in on the_post to set the authordata?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions