Retrieves the number of published posts per month within a specified time range.
The queryPostCountStats()
function returns a Promise that resolves to the number of posts per month within the specified time range.
You can set the time range using the rangeStart
and months
properties. The time range always starts on the 1st day of the month set in rangeStart
and includes the number of months
following rangeStart
. For example, if rangeStart
is set to '2022-03-13'
and months
is set to 4
, the time range will be from '2022-03-01'
until '2022-06-30'
. The time range ends on the last day of the month.
Note: If there are no published posts in a specific month, that month is not included in the response. For example, let's say a blog has 0
posts dated in February 2022. If rangeStart
is set to '2022-01-01'
and months
is set to 3
, the response includes postCount
values for January and March, but not February.
Options specifying time frame, sort, and filter.