Quantcast
Channel: Topic Tag: MySQL | WordPress.org
Viewing all articles
Browse latest Browse all 5534

Jenksuy on "[Plugin: Advanced Custom Fields] why is get_field not returning any values?"

$
0
0

Hi There,

So I am using ACF to add dates to event posts. And I am looking to format the date. However the get_field code seems to be not returning any values for me? However if i just print the date with 'the_field' code it is obvious that there are values there.

here is my code

<?php
        $timestamp = strtotime(get_field('event_date'));
	print date("Y-m-d H:i:s", $timestamp);
?>

Does anyone know how I can Fix this?

Thanks
Chris

http://wordpress.org/plugins/advanced-custom-fields/


Viewing all articles
Browse latest Browse all 5534

Trending Articles