• I don’t think the acf_date parameter is working with the date_format parameter.

    [field acf_date=datetimepick] correctly displays the Unix timestamp, eg. 1604016000
    [field acf_date=datetimepick date_format="Ymd"] displays no output

    As suggested, I have the Advanced Custom Fields data time picker stored as a Unix timestamp.

    I’ve had to resort to using a workaround using the Insert PHP Code Snippet plugin, to define a shortcode, eg [xyz-ips snippet=”showdate”] with the PHP snippet:
    Shortcode PHP Snippet:

    <?php
    the_field('datetimepick');
    • This topic was modified 5 years, 7 months ago by iantresman.
    • This topic was modified 5 years, 7 months ago by iantresman.
Viewing 1 replies (of 1 total)
  • Try
    [format date=Ymd in=timestamp][field datetimepick][/format]

    I do not have a time-stamp field available, so I’m not sure about adding format to [field]. But syntax should be same.

    • This reply was modified 5 years, 7 months ago by polarracing.
Viewing 1 replies (of 1 total)

The topic ‘acf_date parameter formatting bug?’ is closed to new replies.