WordPress.org

Support

Support » How-To and Troubleshooting » Allow zero/null values in publish date?

Allow zero/null values in publish date?

  • Hi, I am using WordPress to create news-based timelines. For now, I am using the publish date as the date of the event. For example, I set the publish date to 21 Feb, 1954 to show an event on that date.

    Example Timeline: Aaron Swartz

    My problem is that I do not know the date, or even month of some events. For example, in the above timeline I don’t know the month that Swartz graduated from Stanford.

    The problem is that the WordPress “publish post” input validation forces me to add the month and date. It will not let me put in zero or null.

    Does anyone have a simple work around for this?

    The second part of the question is how to display the date with the null data in it.

    Thank you for your help!

Viewing 1 replies (of 1 total)
  • I do not think there is a simple work around. The wp_posts table definition for the post_date column specifies NULL = ‘NO’. It is not input validation, but the table definition, that is rejecting null values.

Viewing 1 replies (of 1 total)
  • The topic ‘Allow zero/null values in publish date?’ is closed to new replies.
Skip to toolbar