Hello,
The format used for date is what you have set in wp-admin > Settings.
Hi Manzoor.
No, it’s not that. The WP Settings is ok.
I’m using the ACF Plugin for my custom fields. Is that a problem?
Take a look: https://prnt.sc/pin3ut
-
This reply was modified 6 years, 7 months ago by
arthurcarlos.
Is there any option to set the date format in ACF, if not then it needs custom code to get the job done. In that case, what’s the field name in ACF?
Yes, it’s set to the DD/MM/YYYY on the visual format.
The name is: {cf:data_do_jogo}
Here is the code you can use:
/* WP Telegram | Get field value from ACF */
add_filter(
'wptelegram_p2tg_post_data_cf:data_do_jogo_value',
function ( $value, $post ) {
if ( function_exists( 'get_field' ) ) {
$value = get_field( 'data_do_jogo', $post->ID );
}
return $value;
},
10,
2
);