Support

Account

Home Forums ACF PRO Auto Update Date when post get update

Unread

Auto Update Date when post get update

  • Hey Guys i am using ACF field to show post update date but the thing is i have to manually change the date everytime what i want to achieve is ACF automatically change date in product page to actual product update date….

    i hope my query is clear please help thanks

    i am using date filed in product page and i am using this code to auto fill todays date but date update is not working automatically

    add_filter(‘acf/load_field/name=updates_on’, ‘my_acf_default_date’);
    function my_acf_default_date($field) {
    $field[‘default_value’] = date(‘F j, Y’);
    return $field;
    }

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.