Designing a custom post type with a minimum number of meta fields

If I understood you right, you need only two meta fields: start_date and end_date for your posts. Then you can compare current date to these fields and create (update) a taxonomy for the posts:

  • Undated, if the post have no both start and end dates;
  • Dated, if there only start date exists and current date is lesser;
  • Ongoing, if current date is between start and end dates;
  • Completed, if current date is greater than end date.

Each time somebody visits the site your theme or plugin function will check the dates and update taxonomies for posts where current date does not fit in it’s taxonomy any more.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)