wp cli - How to use wp-cli's post list function to return posts published in a specific date range?

admin2025-01-08  4

I'm trying to use wp-cli's wp post list function to select posts from a specific date range but I cannot figure out the proper syntax to use.

According to its documentation, you can use the syntax from WP_QUERY class, so it looks to be possible.

Specifically, I'm trying to list all posts that were published between a date range of 2020-06-01 and 2018-03-01

I found that wp-cli has a year parameter that's mostly undocumented so wp post list --year=2020 does return all posts published in 2020 but I need to be able to filter by a specific month and day as well.

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1736268015a1240.html

最新回复(0)