1. Home
  2. Docs
  3. Divi Query Builder
  4. Content Settings
  5. Date Query

Date Query

This section appears for post queries and it is helpful to restrict your query using dates. See WP Documentation.

  • Date After/Before:  Activate this option to enter values for after and/or before dates, to set a custom interval from where you will want to get posts.
  • Year: Enter a four-digit year number.
  • Month: Enter month number 1-12.
  • Week: Enter week number 0-53.
  • Day: Enter day number 1-31.
  • Hour: Enter hour number 0-23.

Some use cases:

  1. Retrieve posts published within the last week: Activate the Date After/Before option and add the text 7 days ago to the After option.
  2. Retrieve posts published in the previous year: Activate the Date After/Before option, add the text January 1st, last year to the After option, and add the text December 31st, last year to the Before option.
  3. Retrieve posts published in the first quarter (January, February, March) of the current year: Activate the Date After/Before option, add the text January 1st, this year to the After option, and add the text March 31st, this year to the Before option.
  4. Retrieve posts published on a specific day (e.g., January 15th, 2025): Set Year to 2025, Month to 1, and day to 15.

0 Comments

Submit a Comment

How can we help?