entity-command icon indicating copy to clipboard operation
entity-command copied to clipboard

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

Open rob006 opened this issue 6 years ago • 1 comments

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.

rob006 avatar Nov 30 '19 21:11 rob006

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

Sidsector9 avatar Feb 20 '22 14:02 Sidsector9