WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
why is get_field not returning any values? (1 post)

  1. Jenksuy
    Member
    Posted 1 year ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic