Taxonomy custom date field into timestamp
-
Scratching my head again… There was this great solution posted by Peter to get ACF date picker fields save values as timestamps into the database: https://wordpress.org/support/topic/before-and-after-for-date-fields-anyone-getting-it-to-work/#post-11240427
It works perfectly for fields that are set for custom post types. I’m not sure if it’s due to the snippet or how I’m calling the fields with shortcode, but I’m not getting the output to be timestamps when the field is a custom field for a taxonomy.
Been trying
[taxonomy taxonomy_name field=date_field]also tried[taxonomy taxonomy_name acf_date=date_field]and addingdate_format='U', but having no luck.I’m assuming this might be due to the snippet is not actually doing anything for the taxonomy custom field. As the output is always dd/mm/yyyy
Anyone have any experience with date fields associated with taxonomies?
The topic ‘Taxonomy custom date field into timestamp’ is closed to new replies.