Posts publish date search


The publish date search allows you to find posts/locations published after/before/within a specific period/date. What’s cool about this search tool is that it provides two search options that you’ll discover below. To add the publish date search to your form, follow these steps:

  1. Edit your search form
  2. Click on the menu “Publish date search”
  3. In the field “Use publish date search option?”, select the option “Yes”
  4. In the field “Title”, enter the title of the publish date search field (the field label).
  5. In the field “Description”, enter the description of the publish date search field (the field description).
  6. Read the following before saving the search form …

1. Search by predefined periods

The “predefined periods” search allows you to find posts/locations added after and/or before specific number of hours, days, months and/or years. By using this option, a select list that contains your predefined periods will be added to your search form.

To activate this options, follow these steps:

  1. In the field “Publish date search type”, select the option “Predefined periods”
  2. Scroll down to the section “Predefined periods parameters” and click on the group field “Predefined periods”
  3. In the field “Period Title”, enter the title of your predfined period (e.g. “Anytime”, “Last 24 hours”, “Last 7 days”)
  4. In the field “Period Length”, specify the length of your predefined period. The length can be expresed with hours, days, months and/or years.
  5. In the field “Period type”, define your predefined period type.
    1. “Before x hours”: This option allows to find posts/locations published before specific hours.
    2. “After x hours”: This option allows to find posts/locations published after specific hours.
    3. “Before x days”: This option allows to find posts/locations published before specific days.
    4. “After x days”: This option allows to find posts/locations published after specific days.
    5. “Before x months”: This option allows to find posts/locations published before specific months.
    6. “After x months”: This option allows to find posts/locations published after specific months.
    7. “Before x years”: This option allows to find posts/locations published before specific years.
    8. “After x years”: This option allows to find posts/locations published after specific years.
  6. To add another predefined period, click on the button “Add new predefined period” and repeat the steps 3, 4 and 5.
  7. Save your search form

2. Search by date or date range

The “date/date range” search allows you to find posts/locations added after/before a date and/or between two dates. By using this option, a datepicker will be added to your search form.

To activate this options, follow these steps:

  1. In the field “Publish date search type”, select the option “Date/Date range”
  2. Scroll down to the section “Posts publish date parameters” and click on the group field “Datepicker parameters”
  3. In the field “Search by”, select a search option:
    1. “Exact date”: This option allows you to find posts/locations published on the selected date.
    2. “After date”: This option allows you to find posts/locations published after a specific date.
    3. “Before date”: This option allows you to find posts/locations published before a specific date.
    4. “Between two dates”: This option allows you to find posts/locations published between two dates.
  4. Choose the date format of the datepicker in the field “Date format”.
  5. In the field “Exclude date attributes” you can remove one or more attributes from the date. For example, to remove the day number from the datepicker, select the option “Day”.
  6. In the field “Start date” you can specify the minimum date of the datepicker. All dates before the start date will be disabled.
  7. In the field “End date” you can specify the maximum date of the datepicker. All dates after the end date will be disabled.
  8. In the field “Start view”, select the start view of the datepicker. For example, to load the datepicker on years, select the option “Years”.
  9. Select the week start of the datepicker in the field “Week start”.
  10. To automatically open the datepicker on page load, select the option “Yes” in the field “Auto show”.
  11. To automatically close the datepicker after selecting a date, select the option “Yes” in the field “Auto hide”.
  12. Save your search form

In the same context