Skip to content

TimberPost constructor doing bad guesswork #520

@teohhanhui

Description

@teohhanhui

Problem introduced by 3d633c6

We cannot assume that $wp_query->queried_object_id does not refer to a taxonomy ID or anything else... Which means this is totally broken when used in the loop on a category archive page, for example.

I don't even think it was a correct fix for #344 as doing new TimberPost() in the loop now gets you the page (how counter-intuitive!). The correct behavior would be for TimberPost to always have the same result as get_post

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions