Skip to content

wp post list --post_status="draft" returns published posts if they're sticky #278

Closed as not planned

Description

@rob006

88b58446

First 4 posts are sticky posts. Two of them are public - they should no be returned by command if --post_status="draft" filter is enabled.

Activity

  1. Sidsector9 commented on Feb 20, 2022

    @Sidsector9
    Member

    Hi @rob006 , thanks for reporting this.

    It does seem that it is intentional if we consider the ignore_sticky_posts option, but at the same time I couldn't find any document stating sticky posts will be returned for all post statuses. I've raised it on Trac here, let's wait to hear back from the Core Team.

    For now, you can use the following command:
    wp post list --post_status="draft" --ignore_sticky_post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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